-
Notifications
You must be signed in to change notification settings - Fork 531
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
implement cosign copy
#317
Conversation
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.
Nice! two nits.
cmd/cosign/cli/copy.go
Outdated
func Copy() *ffcli.Command { | ||
var ( | ||
flagset = flag.NewFlagSet("cosign copy", flag.ExitOnError) | ||
srcImgFlag = flagset.String("source", "", "the image (and associated signatures) to copy") |
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.
Do you think we need to be explicit about src and dst with named flags rather than positionals? I could see it either way.
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.
made it positional src dst
cmd/cosign/cli/copy.go
Outdated
|
||
EXAMPLES | ||
# copy a container image and signature | ||
cosign copy -source example.com/foo:latest -destination example.com/bar:oldest |
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.
This might not be the best example since it's the same repo. It would "work" but isn't really any different than a crane cp, since the signature doesn't actually move. Maybe two repos?
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.
done
Signed-off-by: Jake Sanders <jsand@google.com>
Fixes #303
Signed-off-by: Jake Sanders jsand@google.com