feat: add platform flag to cosign copy command#3234
Merged
znewman01 merged 8 commits intosigstore:mainfrom Sep 16, 2023
Merged
Conversation
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
znewman01
suggested changes
Sep 10, 2023
Contributor
znewman01
left a comment
There was a problem hiding this comment.
Thank you very much for this change! I left some minor feedback
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #3234 +/- ##
==========================================
- Coverage 30.37% 30.35% -0.03%
==========================================
Files 155 155
Lines 9828 9845 +17
==========================================
+ Hits 2985 2988 +3
- Misses 6397 6410 +13
- Partials 446 447 +1
|
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Contributor
Author
|
@znewman01 I have added a unit test as well as a example in pull request description. Can you please review it again |
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
znewman01
approved these changes
Sep 16, 2023
| # overwrite destination image and signatures | ||
| cosign copy -f example.com/src example.com/dest | ||
|
|
||
| # copy a container image and its signatures for a specific platform |
Contributor
There was a problem hiding this comment.
nitpick: can you dedent this line?
lance
pushed a commit
to securesign/cosign
that referenced
this pull request
Sep 25, 2023
* feat: add platform flag to copy Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * feat: extract platformList to common package Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * add platform check to copycmd Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * refactor: add platform package in pkg/oci Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * feat: add a unit test Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * feat: add boilerplate Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * feat: export platform list type Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * lint: fix linting errors Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> --------- Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Vishal Choudhary sendtovishalchoudhary@gmail.com
Summary
Fixes: #2748
This PR adds a
--platformflag tocosign copy. This allows copying images and signatures for specific platform/architecture./cc @imjasonh @znewman01 @cpanato
Before:
After:
Release Note
Added
--platformflag tocosign copycommand