-
Notifications
You must be signed in to change notification settings - Fork 183
Add more information to meta.json in buildah path for backwards compatibility
#4281
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
Changes from 3 commits
0690b97
8c8ca59
7fd9329
2353dce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -119,7 +119,7 @@ def generate_build_meta(tmp_oci_archive, tmp_oci_manifest, metadata, ostree_comm | |||||||||
| created_timestamp = parse_timestamp(metadata['Created']) | ||||||||||
| arch = get_basearch() | ||||||||||
|
|
||||||||||
| return { | ||||||||||
| meta = { | ||||||||||
| 'ostree-commit': ostree_commit, | ||||||||||
| 'ostree-version': buildid, | ||||||||||
| 'buildid': buildid, | ||||||||||
|
|
@@ -145,6 +145,25 @@ def generate_build_meta(tmp_oci_archive, tmp_oci_manifest, metadata, ostree_comm | |||||||||
| }, | ||||||||||
| } | ||||||||||
|
|
||||||||||
| # proxy build repo and commit to the standard cosa key | ||||||||||
| source = metadata.get('Labels', {}).get('org.opencontainers.image.source') | ||||||||||
| commit = metadata.get('Labels', {}).get('org.opencontainers.image.revision') | ||||||||||
|
Comment on lines
+149
to
+150
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid calling
Suggested change
|
||||||||||
| if source and commit: | ||||||||||
| meta['coreos-assembler.container-config-git'] = { | ||||||||||
| 'origin': source, | ||||||||||
| 'commit': commit, | ||||||||||
| } | ||||||||||
|
|
||||||||||
| # add a reference to ourselves as well | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the comment about this from
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will tweak in the next patch set. |
||||||||||
| try: | ||||||||||
| with open('/cosa/coreos-assembler-git.json') as f: | ||||||||||
| cosa_git = json.load(f) | ||||||||||
| meta['coreos-assembler.container-image-git'] = cosa_git['git'] | ||||||||||
| except FileNotFoundError: | ||||||||||
| pass | ||||||||||
|
|
||||||||||
| return meta | ||||||||||
|
|
||||||||||
|
|
||||||||||
| def finalize_build(builds, build_meta, tmp_oci_archive, tmp_oci_manifest, tmp_lockfile): | ||||||||||
| buildid = build_meta['buildid'] | ||||||||||
|
|
||||||||||
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.
These comments are a bit confusing as they describe the logic within
prepare_git_artifacts, which has already been executed. They don't seem to apply to thebuildah buildcommand that follows. Removing them would improve the script's clarity.