-
Notifications
You must be signed in to change notification settings - Fork 173
Add --registry-authfile to specify a specific auth file for the registry push #3208
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
Add --registry-authfile to specify a specific auth file for the registry push #3208
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3208 +/- ##
==========================================
+ Coverage 51.81% 54.55% +2.74%
==========================================
Files 162 162
Lines 19131 19216 +85
==========================================
+ Hits 9912 10484 +572
+ Misses 8241 7688 -553
- Partials 978 1044 +66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/hold |
|
/unhold |
ba236bd to
a1e3e31
Compare
|
/test ? |
|
@creydr: The following commands are available to trigger required jobs: Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
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
Can we make this change to the oci.Pusher as well, so that it works withe the Host builder (and for users with no docker/podman available)? They're all using the creds package, so I assume this could work for both pushers.
Also, if you rebase on main you'll get some improved E2E tests.
a1e3e31 to
2f563bf
Compare
Hey @lkingland, |
|
Rebased. Tests seem to pass now again |
|
/cc @lkingland @gauron99 |
|
@lkingland @gauron99 can you recheck? |
twoGiants
left a comment
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 😸 👍
Found only minor things in the test. See comments below.
pkg/creds/credentials_test.go
Outdated
| t.Fatalf("failed to create temp auth file: %s", err) | ||
| } | ||
| t.Cleanup(func() { | ||
| os.Remove(authFile.Name()) |
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.
You could use t.TempDir and create the file there. Then you would not need to cleanup as the temp dir is removed automatically.
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.
Good point. Updated it
pkg/creds/credentials_test.go
Outdated
| // ASSERT | ||
| if err != nil { | ||
| t.Errorf("%v", err) | ||
| return | ||
| } |
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.
| // ASSERT | |
| if err != nil { | |
| t.Errorf("%v", err) | |
| return | |
| } | |
| if err != nil { | |
| t.Fatalf("unexpected error: %v", err) | |
| } |
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 can probably updated in few more tests in this file.
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.
👍 Updated it
|
|
||
| // ********************** helper functions below **************************** \\ | ||
|
|
||
| func resetHomeDir(t *testing.T) { |
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.
Right below that line in 906 is t.TempDir() which probably should be t.Helper(). And the function right below resetHomePermissions is missing the t.Helper() too.
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.
👍
twoGiants
left a comment
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 great! 😸 👍
|
/assign @gauron99 @lkingland |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, gauron99, twoGiants The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
--registry-authfile stringbuild parameter to allow to specify a custom registry auth file location/kind enhancement
Release Note