Skip to content
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

cmd-remote-build-container: add --write-digest-to-file #4048

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Mar 20, 2025

This basically maps to podman's --digestfile option. This is useful as a way to reference the pushed image by digest instead of by tag.

This basically maps to podman's `--digestfile` option. This is useful as
a way to reference the pushed image by digest instead of by tag.
@@ -132,6 +134,8 @@ def main():
# Check for requisite env vars
if os.environ.get('CONTAINER_HOST') is None or os.environ.get('CONTAINER_SSHKEY') is None:
sys.exit('You must have CONTAINER_HOST and CONTAINER_SSHKEY environment variables setup')
if args.write_digest_to_file is not None and not args.push_to_registry:
sys.exit('argument --write-digest-to-file can only be used with --push-to-registry')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find an easy way to express this using more argparse-native APIs instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There this file will be? in the remote or in the host? Don't we need something like the pull_oci_archive_from_remote ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be on the host. It seems like podman is smart enough in this case to do the pushing on the remote, but the writing of this file on the host.

Copy link
Member

@ravanelli ravanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlebon jlebon enabled auto-merge (rebase) March 20, 2025 14:59
@jlebon
Copy link
Member Author

jlebon commented Mar 24, 2025

/override ci/prow/rhcos

Copy link

openshift-ci bot commented Mar 24, 2025

@jlebon: Overrode contexts on behalf of jlebon: ci/prow/rhcos

In response to this:

/override ci/prow/rhcos

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.

@jlebon jlebon merged commit f4892e8 into coreos:main Mar 24, 2025
5 checks passed
@jlebon jlebon deleted the pr/digest-to-file branch March 24, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants