Issue 17941: Add oc new-build --push-secret option#18477
Issue 17941: Add oc new-build --push-secret option#18477openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
bparees
left a comment
There was a problem hiding this comment.
needs tests for the new flag (see test/cmd/newapp.sh)
pkg/oc/cli/cmd/newbuild.go
Outdated
| cmd.Flags().StringSliceVar(&config.DockerImages, "docker-image", config.DockerImages, "Name of a Docker image to use as a builder.") | ||
| cmd.Flags().StringSliceVar(&config.Secrets, "build-secret", config.Secrets, "Secret and destination to use as an input for the build.") | ||
| cmd.Flags().StringVar(&config.SourceSecret, "source-secret", "", "The name of an existing secret that should be used for cloning a private git repository.") | ||
| cmd.Flags().StringVar(&config.PushSecret, "push-secret", "", "The name of an existing secret that should be used for pushing to a Docker repository if --to-docker and --to are set.") |
There was a problem hiding this comment.
if --to-docker and --to are set
the way you've currently implemented this, the secret will be used regardless of whether --to/--to-docker are set. I'd just write the help as "The name of an existing secret that should be used for pushing the output image"
There was a problem hiding this comment.
thanks, updated and added tests
47b8fa7 to
53c3aef
Compare
|
/lgtm |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest |
1 similar comment
|
/retest |
|
@bparees no problem, that makes sense. updated |
|
thanks @damemi |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, damemi The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/retest |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue. |
|
why this option is still not available in 2023? where this is documented? |
Adds a
--push-secretoption tooc new-buildas requested in #17941fixes #17941