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.
👍🏻 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.
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.
You could use t.TempDir and create the file there. Then you would not need to cleanup as the temp dir is removed automatically.
pkg/creds/credentials_test.go
Outdated
| // ASSERT | ||
| if err != nil { | ||
| t.Errorf("%v", err) | ||
| return | ||
| } |
There was a problem hiding this comment.
| // 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.
This can probably updated in few more tests in this file.
|
|
||
| // ********************** helper functions below **************************** \\ | ||
|
|
||
| func resetHomeDir(t *testing.T) { |
There was a problem hiding this comment.
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.
|
/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