Skip to content

Commit 5173174

Browse files
committed
cmd-osbuild: drop use of runvm_with_cache_snapshot
In the case where we were running multiple parallel tasks in the pipeline that were running VMs and accessing the cache qcow we needed this, but with [1] we are now consolidating all OSBuild pipeline tasks into single non-parallel invocations. [1] coreos/fedora-coreos-pipeline#1055
1 parent f8f9db3 commit 5173174

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/cmd-osbuild

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ main() {
347347
done
348348

349349
tobuild=()
350-
building_qemu=0
351350
for platform in "${platforms[@]}"; do
352351
# check if the image already exists in the meta.json
353352
meta_img=$(meta_key "images.${platform}.path")
@@ -357,7 +356,6 @@ main() {
357356
else
358357
tobuild+=("${platform}")
359358
echo "Will build $platform"
360-
[ "${platform}" == 'qemu' ] && building_qemu=1
361359
fi
362360
done
363361
if [ ${#tobuild[@]} == "0" ]; then
@@ -366,17 +364,10 @@ main() {
366364
fi
367365
platforms=("${tobuild[@]}")
368366

369-
# Run OSBuild now to build the platforms that were requested. In the jenkins
370-
# pipelines we build the qemu image first and that operation will do a lot of
371-
# the same work required for later artifacts (metal, metal4k, etc) so we want
372-
# the cached output from that run to persist. For now, later artifacts get built
373-
# in parallel, so we need to be able to access the cache by multiple processes,
374-
# so for those we'll set `snapshot=on` so that each will get their own disk image.
375-
# This is OK because we don't checkpoint (cache) any of those stages.
376-
[ "${building_qemu}" == '1' ] && snapshot="off" || snapshot="on"
367+
# Run OSBuild now to build the platforms that were requested.
377368
runvm_osbuild_config_json="$(generate_runvm_osbuild_config)"
378369
outdir=$(mktemp -p "${tmp_builddir}" -d)
379-
runvm_with_cache_snapshot "$snapshot" -- /usr/lib/coreos-assembler/runvm-osbuild \
370+
runvm_with_cache -- /usr/lib/coreos-assembler/runvm-osbuild \
380371
--config "${runvm_osbuild_config_json}" \
381372
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
382373
--outdir "${outdir}" \

0 commit comments

Comments
 (0)