From 5ab44b80b4adf9cb471e6ffc060dd5ab5cdac38f Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Fri, 22 Nov 2024 08:38:19 -0500 Subject: [PATCH] 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] https://github.com/coreos/fedora-coreos-pipeline/pull/1055 --- src/cmd-osbuild | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/cmd-osbuild b/src/cmd-osbuild index aa2b43426a..572ffa79ca 100755 --- a/src/cmd-osbuild +++ b/src/cmd-osbuild @@ -347,7 +347,6 @@ main() { done tobuild=() - building_qemu=0 for platform in "${platforms[@]}"; do # check if the image already exists in the meta.json meta_img=$(meta_key "images.${platform}.path") @@ -357,7 +356,6 @@ main() { else tobuild+=("${platform}") echo "Will build $platform" - [ "${platform}" == 'qemu' ] && building_qemu=1 fi done if [ ${#tobuild[@]} == "0" ]; then @@ -366,17 +364,10 @@ main() { fi platforms=("${tobuild[@]}") - # Run OSBuild now to build the platforms that were requested. In the jenkins - # pipelines we build the qemu image first and that operation will do a lot of - # the same work required for later artifacts (metal, metal4k, etc) so we want - # the cached output from that run to persist. For now, later artifacts get built - # in parallel, so we need to be able to access the cache by multiple processes, - # so for those we'll set `snapshot=on` so that each will get their own disk image. - # This is OK because we don't checkpoint (cache) any of those stages. - [ "${building_qemu}" == '1' ] && snapshot="off" || snapshot="on" + # Run OSBuild now to build the platforms that were requested. runvm_osbuild_config_json="$(generate_runvm_osbuild_config)" outdir=$(mktemp -p "${tmp_builddir}" -d) - runvm_with_cache_snapshot "$snapshot" -- /usr/lib/coreos-assembler/runvm-osbuild \ + runvm_with_cache -- /usr/lib/coreos-assembler/runvm-osbuild \ --config "${runvm_osbuild_config_json}" \ --mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \ --outdir "${outdir}" \