-
Notifications
You must be signed in to change notification settings - Fork 551
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 platform flag to cosign copy command #3234
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>
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.
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>
@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>
@@ -19,6 +19,9 @@ cosign copy [flags] | |||
|
|||
# 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 |
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.
nitpick: can you dedent this line?
* 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>
Signed-off-by: Vishal Choudhary sendtovishalchoudhary@gmail.com
Summary
Fixes: #2748
This PR adds a
--platform
flag tocosign copy
. This allows copying images and signatures for specific platform/architecture./cc @imjasonh @znewman01 @cpanato
Before:
After:
Release Note
Added
--platform
flag tocosign copy
command