-
Notifications
You must be signed in to change notification settings - Fork 549
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
feat: add --only
flag in cosign copy
to copy sign, att & sbom
#3247
Conversation
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #3247 +/- ##
==========================================
+ Coverage 30.35% 30.77% +0.42%
==========================================
Files 155 155
Lines 9845 9949 +104
==========================================
+ Hits 2988 3062 +74
- Misses 6410 6431 +21
- Partials 447 456 +9
|
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few nits!
Sorry for the delay, working through the backlog of PRs.
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
@haydentherapper Fixed, can you please re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also run make docgen
?
cmd/cosign/cli/copy/copy.go
Outdated
@@ -175,12 +174,13 @@ func remoteCopy(ctx context.Context, pusher *remote.Pusher, src, dest name.Refer | |||
return pusher.Push(ctx, dest, got) | |||
} | |||
|
|||
func parseOnlyFlag(str string, sigOnly bool) []tagMap { | |||
func parseeOnlyOpt(str string, sigOnly bool) []tagMap { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling "parseOnlyOpt"
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
@haydentherapper fixed |
PR sigstore#3247 added an --only flag which when set copies only a subset of metadata. By default the flag is set to an empty string, meaning that by default copy would copy nothing. This PR fixes this bug so that if only is unset, copy defaults to the same behavior as before copying everything. Also update the tag name to be sig rather than sign for the flag. Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
PR #3247 added an --only flag which when set copies only a subset of metadata. By default the flag is set to an empty string, meaning that by default copy would copy nothing. This PR fixes this bug so that if only is unset, copy defaults to the same behavior as before copying everything. Also update the tag name to be sig rather than sign for the flag. Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Summary
Closes: #2002
This PR will add a new
--only
flag that accept custom string array to download sboms, signatures and attestationsRelease Note
Added
--only
flag incosign copy
to copy sign, att & sbomDocumentation
Ran
make docgen
to generate required docs