Skip to content

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

Merged
jlebon merged 1 commit intocoreos:mainfrom
jlebon:pr/digest-to-file
Mar 24, 2025
Merged

cmd-remote-build-container: add --write-digest-to-file#4048
jlebon merged 1 commit intocoreos:mainfrom
jlebon:pr/digest-to-file

Conversation

@jlebon
Copy link
Copy Markdown
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.
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

jlebon commented Mar 24, 2025

/override ci/prow/rhcos

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 24, 2025

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

Details

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