Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 17941: Add oc new-build --push-secret option #18477

Merged
merged 1 commit into from
Feb 8, 2018

Conversation

damemi
Copy link

@damemi damemi commented Feb 6, 2018

Adds a --push-secret option to oc new-build as requested in #17941

fixes #17941

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 6, 2018
Copy link
Contributor

@bparees bparees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs tests for the new flag (see test/cmd/newapp.sh)

@@ -114,6 +114,7 @@ func NewCmdNewBuild(name, baseName string, f *clientcmd.Factory, in io.Reader, o
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.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated and added tests

@bparees bparees self-assigned this Feb 6, 2018
@damemi damemi force-pushed the iss17941 branch 2 times, most recently from 47b8fa7 to 53c3aef Compare February 6, 2018 18:56
@bparees
Copy link
Contributor

bparees commented Feb 6, 2018

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 6, 2018
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@damemi
Copy link
Author

damemi commented Feb 6, 2018

/retest

1 similar comment
@damemi
Copy link
Author

damemi commented Feb 6, 2018

/retest

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 6, 2018
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2018
@bparees
Copy link
Contributor

bparees commented Feb 7, 2018

@damemi can you add secret name validation for the new argument (and a test) like is being done here:
#18429
?

(sorry, just figured we might as well be consistent w/ the other change that's going in there)

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 7, 2018
@damemi
Copy link
Author

damemi commented Feb 7, 2018

@bparees no problem, that makes sense. updated

@bparees
Copy link
Contributor

bparees commented Feb 7, 2018

thanks @damemi
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2018
@openshift-ci-robot
Copy link

[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.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@damemi
Copy link
Author

damemi commented Feb 7, 2018

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit 56efdb0 into openshift:master Feb 8, 2018
@damemi damemi deleted the iss17941 branch February 12, 2018 13:39
@Eliav2
Copy link

Eliav2 commented May 3, 2023

why this option is still not available in 2023? where this is documented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --push-secret option to oc new-build for when using --to-docker --to with registry requiring auth.
6 participants