-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Consolidate the definition and consumption of --sign* CLI options #26617
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
base: main
Are you sure you want to change the base?
Conversation
CredentialsCLI string | ||
signing common.SigningCLIOnlyOptions | ||
EncryptionKeys []string | ||
EncryptLayers []int |
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.
More of this could probably be shared, but I don’t need to do that for my purposes now.
Failing as there are no new tests. Should we add the flag to override that? |
I’ll just add a test for |
28ba166
to
1ce6abb
Compare
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
b93e021
to
344c4be
Compare
b93e021 shows the new tests failing… |
… and tests are succeeding with the fix as intended. PTAL. |
test/e2e/artifact_test.go
Outdated
@@ -158,6 +160,47 @@ var _ = Describe("Podman artifact", func() { | |||
Expect(a.Name).To(Equal(artifact1Name)) | |||
}) | |||
|
|||
It("podman artifact push and pull with authorization", func() { |
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.
name says push and pull but this test only ever tries push
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.
Fixed, thanks!
CLI options have no place in pkg/domain/entities, and these are never set anyway. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Actually use the parsed values. Signed-off-by: Miloslav Trmač <[email protected]>
There are three copies of them, and already a shared utility, so also define the options in a single place. This will make it easier to add more options, and it reduces the risk of incorrectly ordering the parameters to PrepareSigning. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, mtrmac The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Only define
--sign*
options once, to reduce repetition and simplify adding another one. This will help adding--sign-by-sq-fingerprint
.Also clean up some artifact code.
See individual commit messages for details.
Does this PR introduce a user-facing change?