Skip to content

Commit ba8233e

Browse files
committed
runvm-osbuild: get platform information from --platform option
This will enable us to generate the input config for runvm-osbuild once and re-use it for all platforms. In other words, the input JSON to runvm-osbuild shouldn't change between invocations.
1 parent 888afbf commit ba8233e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/cmd-buildextend-metal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ osname: "${name}"
190190
ostree-container: "${ostree_container}"
191191
ostree-ref: "${ref}"
192192
extra-kargs-string: "${extra_kargs}"
193-
image-type: "${image_type}"
194193
ostree-repo: "${ostree_repo}"
195194
metal-image-size: "${metal_image_size_mb}"
196195
cloud-image-size: "${cloud_image_size_mb}"
@@ -211,7 +210,8 @@ cat "${image_json}" "${image_dynamic_json}" | jq -s add > "${image_for_disk_json
211210
runvm_with_cache_snapshot "$snapshot" -- /usr/lib/coreos-assembler/runvm-osbuild \
212211
--config "${image_for_disk_json}" \
213212
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
214-
--filepath "${imgpath}"
213+
--filepath "${imgpath}" \
214+
--platform "${image_type}"
215215

216216
if [[ "${image_type}" == "qemu-secex" ]]; then
217217
if [ ! -f "${genprotimgvm}" ]; then

src/runvm-osbuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Options:
1111
--help: show this help
1212
--mpp: the path to the OSBuild mpp.yaml file
1313
--filepath: where to write the created image file
14+
--platform: the platform to generate an artifact for
1415
1516
You probably don't want to run this script by hand. This script is
1617
run as part of 'coreos-assembler build'.
@@ -39,6 +40,7 @@ do
3940
--help) usage; exit;;
4041
--mpp) mppyaml="${1}"; shift;;
4142
--filepath) filepath="${1}"; shift;;
43+
--platform) platform="${1}"; shift;;
4244
*) echo "${flag} is not understood."; usage; exit 10;;
4345
esac;
4446
done
@@ -48,7 +50,6 @@ filename=$(basename "$filepath")
4850

4951
ostree_container=$(getconfig "ostree-container")
5052
osname=$(getconfig "osname")
51-
platform=$(getconfig "image-type")
5253
deploy_via_container=$(getconfig_def "deploy-via-container" "")
5354
metal_image_size_mb=$(getconfig "metal-image-size")
5455
cloud_image_size_mb=$(getconfig "cloud-image-size")

0 commit comments

Comments
 (0)