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

Migrate cosign sign to cobra #762

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Migrate cosign sign to cobra #762

merged 1 commit into from
Sep 23, 2021

Conversation

n3wscott
Copy link
Contributor

Summary

Migrate cosign sign to a new cobra code path. Same options.

No option grouping yet. That will happen as we progress this process.

Ticket Link

Relates to #706

Release Note

NONE


// TODO: an interesting idea? This hides the flags that are experimental
// unless experimental is enabled.
if EnableExperimental() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review this, I can revert, I thought it was interesting at this moment.

Copy link
Member

Choose a reason for hiding this comment

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

hmmm, I kinda like it and I also kinda don't. I like that you'd be seeing COSIGN_EXPERIMENTAL=👍 before even trying to execute a command, but I also like the discoverability of just having them out in the open with the "[EXPERIMENTAL]" caveat and the feature flag gate

@@ -171,34 +170,25 @@ EXAMPLES
`,
FlagSet: flagset,
Exec: func(ctx context.Context, args []string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should never be called.

Signed-off-by: Scott Nichols <[email protected]>
cmd.Flags().StringSliceVarP(&o.Annotations, "annotations", "a", nil,
"extra key=value pairs to sign")

cmd.Flags().BoolVar(&o.RegistryOpts.AllowInsecure, "allow-insecure-registry", false,
Copy link
Member

Choose a reason for hiding this comment

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

IMHO we'll want to keep shared flag logic split out into shared libraries. e.g. registry opts, rekor opts, fulcio (OIDC) opts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, that will come as I see what is common.


// TODO: an interesting idea? This hides the flags that are experimental
// unless experimental is enabled.
if EnableExperimental() {
Copy link
Member

Choose a reason for hiding this comment

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

hmmm, I kinda like it and I also kinda don't. I like that you'd be seeing COSIGN_EXPERIMENTAL=👍 before even trying to execute a command, but I also like the discoverability of just having them out in the open with the "[EXPERIMENTAL]" caveat and the feature flag gate

@dekkagaijin dekkagaijin merged commit db5af1f into sigstore:main Sep 23, 2021
@github-actions github-actions bot added this to the v1.3.0 milestone Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants