summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-29 16:20:44 +0200
committerGitHub <noreply@github.com>2020-04-29 16:20:44 +0200
commita76a99352a2145e1dd6b70db56d9cfa550633fbd (patch)
tree1ada16a3568689fc975b26ab716ec9299645a9a0 /cmd/podman/images
parent6246165f168ab1d619bf4650590e32e035893143 (diff)
parent5c108f75ebdf4bf9214504f8b170ffabff1a38d4 (diff)
downloadpodman-a76a99352a2145e1dd6b70db56d9cfa550633fbd.tar.gz
podman-a76a99352a2145e1dd6b70db56d9cfa550633fbd.tar.bz2
podman-a76a99352a2145e1dd6b70db56d9cfa550633fbd.zip
Merge pull request #6037 from vrothberg/enable-push-tests
Enable push tests
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/push.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go
index ef2ffd0d7..0b3502d61 100644
--- a/cmd/podman/images/push.go
+++ b/cmd/podman/images/push.go
@@ -98,6 +98,7 @@ func imagePush(cmd *cobra.Command, args []string) error {
switch len(args) {
case 1:
source = args[0]
+ destination = args[0]
case 2:
source = args[0]
destination = args[1]
@@ -107,22 +108,21 @@ func imagePush(cmd *cobra.Command, args []string) error {
return errors.New("push requires at least one image name, or optionally a second to specify a different destination")
}
- pushOptsAPI := pushOptions.ImagePushOptions
// TLS verification in c/image is controlled via a `types.OptionalBool`
// which allows for distinguishing among set-true, set-false, unspecified
// which is important to implement a sane way of dealing with defaults of
// boolean CLI flags.
if cmd.Flags().Changed("tls-verify") {
- pushOptsAPI.TLSVerify = types.NewOptionalBool(pushOptions.TLSVerifyCLI)
+ pushOptions.SkipTLSVerify = types.NewOptionalBool(!pushOptions.TLSVerifyCLI)
}
- if pushOptsAPI.Authfile != "" {
- if _, err := os.Stat(pushOptsAPI.Authfile); err != nil {
- return errors.Wrapf(err, "error getting authfile %s", pushOptsAPI.Authfile)
+ if pushOptions.Authfile != "" {
+ if _, err := os.Stat(pushOptions.Authfile); err != nil {
+ return errors.Wrapf(err, "error getting authfile %s", pushOptions.Authfile)
}
}
// Let's do all the remaining Yoga in the API to prevent us from scattering
// logic across (too) many parts of the code.
- return registry.ImageEngine().Push(registry.GetContext(), source, destination, pushOptsAPI)
+ return registry.ImageEngine().Push(registry.GetContext(), source, destination, pushOptions.ImagePushOptions)
}