Open
Conversation
ad92cea to
c8ae0ab
Compare
* what: if the return code of the rpm process is 2, check if the failure reason is that the package is already installed. * why: when reusing a container, the package might already be present. this occurs when a build runner job must be debugged. Signed-off-by: Uwe Schwaeke <uwe.schwaeke@clyso.com>
* what: add option --tls-verify to subcommands build and runner build. pass the tls-verify flag to skopeo when querying the registry. check if the return value from skopeo inspect equals "not found" (exit code 2). * why: if the image is pushed to a local container registry with a self-signed certificate, skopeo must not verify the certificate to avoid errors. current versions of skopeo (1.20.0) return exit code 2 if an image is not found. Signed-off-by: Uwe Schwaeke <uwe.schwaeke@clyso.com>
* what: check if the vault and transit key is available in the secrets file. retrieve user credentials for the registry and transit. if all credentials are available, sign the image with cosign; otherwise, skip signing. * why: run cbsbuild locally for testing, the image signing step must be skipped if keys are missing. see clyso#24 Signed-off-by: Uwe Schwaeke <uwe.schwaeke@clyso.com>
c8ae0ab to
5cb13ef
Compare
Contributor
|
This PR seems to depend on #29 . |
jecluis
requested changes
Mar 12, 2026
| raise SkopeoError() | ||
|
|
||
| logger.info(f"signed image '{dst}': {out}") | ||
| if can_sign(dst_registry, dst, secrets, transit): |
Contributor
There was a problem hiding this comment.
I think it would be simpler to do something like
if not can_sign(...):
logger.info("can't sign, sorry, 🤷 ")
return
[the code inside that block]
Alternatively, have an else branch with the log message, because otherwise we may not be signing the image and it's not clear why.
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.
what:
check if the vault and transit keys are available in the secrets file.
retrieve user credentials for the registry and transit. if all
credentials are available, sign the image with cosign. otherwise,
skip signing.
why:
signing of rpm is already optional depending on the presence of a key.
now signing of container images is optional too.