diff options
author | Romain Geissler <romain.geissler@amadeus.com> | 2022-07-30 12:50:57 +0000 |
---|---|---|
committer | Romain Geissler <romain.geissler@amadeus.com> | 2022-07-30 15:10:41 +0000 |
commit | 24a599fe1d8f7f9da23cf3056c4eda8bcc89e563 (patch) | |
tree | c91259ed7763a34093cbb19ff03cce5ed15d8479 /pkg/bindings/images | |
parent | fed326d8a6f8d4f7dc490099b29d51fc1754789f (diff) | |
download | podman-24a599fe1d8f7f9da23cf3056c4eda8bcc89e563.tar.gz podman-24a599fe1d8f7f9da23cf3056c4eda8bcc89e563.tar.bz2 podman-24a599fe1d8f7f9da23cf3056c4eda8bcc89e563.zip |
Add flag "--compression-format" to "podman manifest push" both in local/remote mode.
Also Fix usage of flag "--compression-format" for remote "podman image push". Fix usage of flags "--format", "--remove-signatures" in remote "podman manifest push".
Closes #15109.
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r-- | pkg/bindings/images/types.go | 2 | ||||
-rw-r--r-- | pkg/bindings/images/types_push_options.go | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go index 0e672cdea..0664afc1b 100644 --- a/pkg/bindings/images/types.go +++ b/pkg/bindings/images/types.go @@ -123,6 +123,8 @@ type PushOptions struct { Authfile *string // Compress tarball image layers when pushing to a directory using the 'dir' transport. Compress *bool + // CompressionFormat is the format to use for the compression of the blobs + CompressionFormat *string // Manifest type of the pushed image Format *string // Password for authenticating against the registry. diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go index 63a19fb81..1ae031824 100644 --- a/pkg/bindings/images/types_push_options.go +++ b/pkg/bindings/images/types_push_options.go @@ -62,6 +62,21 @@ func (o *PushOptions) GetCompress() bool { return *o.Compress } +// WithCompressionFormat set field CompressionFormat to given value +func (o *PushOptions) WithCompressionFormat(value string) *PushOptions { + o.CompressionFormat = &value + return o +} + +// GetCompressionFormat returns value of field CompressionFormat +func (o *PushOptions) GetCompressionFormat() string { + if o.CompressionFormat == nil { + var z string + return z + } + return *o.CompressionFormat +} + // WithFormat set field Format to given value func (o *PushOptions) WithFormat(value string) *PushOptions { o.Format = &value |