Skip to content

Commit

Permalink
osbuild: support passing down container_imgref as variable
Browse files Browse the repository at this point in the history
Pass in the container_imgref just like is done today for create_disk.sh.
dustymabe committed Jan 22, 2024
1 parent 812f6f3 commit 88e5c9c
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cmd-buildextend-metal
Original file line number Diff line number Diff line change
@@ -251,10 +251,10 @@ qemu_args+=("-drive" "if=none,id=target,format=${image_format},file=${path}.tmp,
cat >image-dynamic.yaml << EOF
# Used by create_disk.sh
buildid: "${build}"
container-imgref: "${container_imgref}"
imgid: "${img}"
ostree-commit: "${commit}"
# Used by both create_disk.sh and runvm-osbuild
container-imgref: "${container_imgref}"
deploy-via-container: "${deploy_via_container}"
osname: "${name}"
ostree-container: "${ostree_container}"
4 changes: 3 additions & 1 deletion src/coreos.osbuild.mpp.yaml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ mpp-vars:
filename: $filename
ociarchive: $ociarchive
osname: $osname
container_imgref: $container_imgref
metal_image_size_mb: $metal_image_size_mb
cloud_image_size_mb: $cloud_image_size_mb
bios_boot_size_mb: 1
@@ -118,7 +119,8 @@ pipelines:
options:
osname:
mpp-format-string: '{osname}'
target_imgref: ostree-remote-registry:fedora:quay.io/fedora/fedora-coreos:stable
target_imgref:
mpp-format-string: '{container_imgref}'
mounts:
- /boot
- /boot/efi
2 changes: 2 additions & 0 deletions src/runvm-osbuild
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ platform=$(getconfig "image-type")
deploy_via_container=$(getconfig_def "deploy-via-container" "")
metal_image_size_mb=$(getconfig "metal-image-size")
cloud_image_size_mb=$(getconfig "cloud-image-size")
container_imgref=$(getconfig "container-imgref")

# If we are deploying via container let's go ahead and pull
# the oci archive path from the config
@@ -77,6 +78,7 @@ osbuild-mpp \
-D filename=\""${filename}"\" \
-D ociarchive=\""${ostree_container}"\" \
-D osname=\""${osname}"\" \
-D container_imgref=\""${container_imgref}"\" \
-D metal_image_size_mb="${metal_image_size_mb}" \
-D cloud_image_size_mb="${cloud_image_size_mb}" \
"${mppyaml}" \

0 comments on commit 88e5c9c

Please sign in to comment.