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

build: Add fedora-coreos.stream to image labels #3214

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ else
ostree_format=$(jq -r '.["ostree-format"]' < "${image_json}")
ostree_tarfile_path="${name}-${buildid}-ostree.${basearch}.ociarchive"
gitsrc=$(jq -r .git.origin < "${PWD}/coreos-assembler-config-git.json")
cmd=(ostree container encapsulate --copymeta="rpmostree.inputhash")
openshift_cvo_labels=$(jq -r '.["ostree-container-inject-openshift-cvo-labels"]' < "${image_json}")

# The ostree-ext default is 64, but this is still too much apparently
Expand All @@ -421,9 +420,7 @@ else
# `cannot mount layer, mount label "" too large 4168 > page size 4096`
MAX_OSTREECONTAINER_LAYERS=50
case "${ostree_format}" in
oci-chunked-v1)
cmd=(rpm-ostree compose container-encapsulate --max-layers="$MAX_OSTREECONTAINER_LAYERS" --format-version=1)
;;
oci-chunked-v1) ;;
*) fatal "Unknown ostree-format: ${ostree_format}"
esac
labels=()
Expand All @@ -432,11 +429,13 @@ else
"--label=io.openshift.build.versions=machine-os=${buildid}"
)
fi
runv "${cmd[@]}" --repo="${tmprepo}" \
runv rpm-ostree compose container-encapsulate --max-layers="$MAX_OSTREECONTAINER_LAYERS" --format-version=1 \
--repo="${tmprepo}" \
--label="coreos-assembler.image-config-checksum=${image_config_checksum}" \
--label="coreos-assembler.image-input-checksum=${image_input_checksum}" \
--label="org.opencontainers.image.source=${gitsrc}" \
--label="org.opencontainers.image.revision=${config_gitrev}" \
--copymeta-opt=fedora-coreos.stream \
"${labels[@]}" \
"${buildid}" \
oci-archive:"${ostree_tarfile_path}".tmp:latest
Expand Down