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

implement cosign copy #317

Merged
merged 1 commit into from
May 11, 2021
Merged

implement cosign copy #317

merged 1 commit into from
May 11, 2021

Conversation

dekkagaijin
Copy link
Member

Fixes #303

Signed-off-by: Jake Sanders jsand@google.com

@dekkagaijin dekkagaijin requested a review from dlorenc May 11, 2021 18:24
Copy link
Member

@dlorenc dlorenc left a comment

Choose a reason for hiding this comment

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

Nice! two nits.

func Copy() *ffcli.Command {
var (
flagset = flag.NewFlagSet("cosign copy", flag.ExitOnError)
srcImgFlag = flagset.String("source", "", "the image (and associated signatures) to copy")
Copy link
Member

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.

Copy link
Member Author

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


EXAMPLES
# copy a container image and signature
cosign copy -source example.com/foo:latest -destination example.com/bar:oldest
Copy link
Member

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?

Copy link
Member Author

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>
@dekkagaijin dekkagaijin merged commit 5fb1755 into sigstore:main May 11, 2021
@dekkagaijin dekkagaijin deleted the cp branch June 10, 2021 01:33
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.

Cosign cp
2 participants