mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
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>
This commit is contained in:
@ -25,12 +25,13 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
|
||||
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
|
||||
|
||||
query := struct {
|
||||
All bool `schema:"all"`
|
||||
Destination string `schema:"destination"`
|
||||
Format string `schema:"format"`
|
||||
RemoveSignatures bool `schema:"removeSignatures"`
|
||||
TLSVerify bool `schema:"tlsVerify"`
|
||||
Quiet bool `schema:"quiet"`
|
||||
All bool `schema:"all"`
|
||||
CompressionFormat string `schema:"compressionFormat"`
|
||||
Destination string `schema:"destination"`
|
||||
Format string `schema:"format"`
|
||||
RemoveSignatures bool `schema:"removeSignatures"`
|
||||
TLSVerify bool `schema:"tlsVerify"`
|
||||
Quiet bool `schema:"quiet"`
|
||||
}{
|
||||
TLSVerify: true,
|
||||
// #14971: older versions did not sent *any* data, so we need
|
||||
@ -71,13 +72,14 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
|
||||
password = authconf.Password
|
||||
}
|
||||
options := entities.ImagePushOptions{
|
||||
All: query.All,
|
||||
Authfile: authfile,
|
||||
Format: query.Format,
|
||||
Password: password,
|
||||
Quiet: true,
|
||||
RemoveSignatures: query.RemoveSignatures,
|
||||
Username: username,
|
||||
All: query.All,
|
||||
Authfile: authfile,
|
||||
CompressionFormat: query.CompressionFormat,
|
||||
Format: query.Format,
|
||||
Password: password,
|
||||
Quiet: true,
|
||||
RemoveSignatures: query.RemoveSignatures,
|
||||
Username: username,
|
||||
}
|
||||
|
||||
if _, found := r.URL.Query()["tlsVerify"]; found {
|
||||
|
@ -306,8 +306,11 @@ func ManifestPush(w http.ResponseWriter, r *http.Request) {
|
||||
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
|
||||
|
||||
query := struct {
|
||||
All bool `schema:"all"`
|
||||
TLSVerify bool `schema:"tlsVerify"`
|
||||
All bool `schema:"all"`
|
||||
CompressionFormat string `schema:"compressionFormat"`
|
||||
Format string `schema:"format"`
|
||||
RemoveSignatures bool `schema:"removeSignatures"`
|
||||
TLSVerify bool `schema:"tlsVerify"`
|
||||
}{
|
||||
// Add defaults here once needed.
|
||||
TLSVerify: true,
|
||||
@ -336,10 +339,13 @@ func ManifestPush(w http.ResponseWriter, r *http.Request) {
|
||||
password = authconf.Password
|
||||
}
|
||||
options := entities.ImagePushOptions{
|
||||
Authfile: authfile,
|
||||
Username: username,
|
||||
Password: password,
|
||||
All: query.All,
|
||||
All: query.All,
|
||||
Authfile: authfile,
|
||||
CompressionFormat: query.CompressionFormat,
|
||||
Format: query.Format,
|
||||
Password: password,
|
||||
RemoveSignatures: query.RemoveSignatures,
|
||||
Username: username,
|
||||
}
|
||||
if sys := runtime.SystemContext(); sys != nil {
|
||||
options.CertDir = sys.DockerCertPath
|
||||
|
Reference in New Issue
Block a user