Skip to content

Commit 1bbf52a

Browse files
nikita-dubrovskiijlebon
authored andcommitted
cmd-buildextend-metal: drop OSBUILD_XXXX env vars
1 parent d37958a commit 1bbf52a

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

src/cmd-buildextend-metal

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -249,32 +249,22 @@ cat "${image_json}" "${image_dynamic_json}" | jq -s add > "${image_for_disk_json
249249
platforms_json="${tmp_builddir}/platforms.json"
250250
yaml2json "${configdir}/platforms.yaml" "${platforms_json}"
251251

252-
# Currently we only support OSBuild for qemu and metal disk images
253252
osbuild_extra_args=()
254-
if [ "${image_type}" == "qemu" ] || [ "${image_type}" == "metal" ] || [ "${image_type}" == "metal4k" ]; then
255-
OSBUILD_SUPPORTED=1
256-
if [[ $secure_execution -eq "1" ]]; then
257-
osbuild_extra_args+=("--secex" "1")
258-
fi
253+
if [[ $secure_execution -eq "1" ]]; then
254+
osbuild_extra_args+=("--secex" "1")
259255
fi
260256

261-
# Run with OSBuild if it's supported, unless it is explicitly disabled with COSA_USE_OSBUILD=0
262-
if [ "${OSBUILD_SUPPORTED:-}" != "" ] && [ "${COSA_USE_OSBUILD:-}" != "0" ]; then
263-
# In the jenkins pipelines we build the qemu image first and that operation
264-
# will do a lot of the same work required for later artifacts (metal, metal4k, etc)
265-
# so we want the cached output from that run to persist. The later artifacts get
266-
# built in parallel, so we need to be able to access the cache by multiple processes,
267-
# so for those we'll set `snapshot=on` so that each will get their own disk image.
268-
# This is OK because we don't checkpoint (cache) any of those stages.
269-
[ "${image_type}" == "qemu" ] && snapshot="off" || snapshot="on"
270-
runvm_with_cache_snapshot "$snapshot" -- /usr/lib/coreos-assembler/runvm-osbuild \
271-
--config "${image_for_disk_json}" \
272-
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
273-
--filepath "${path}.tmp" "${osbuild_extra_args[@]}"
274-
else
275-
echo "OSBUILD_SUPPORTED is not supported or COSA_USE_OSBUILD is unset"
276-
exit 1
277-
fi
257+
# In the jenkins pipelines we build the qemu image first and that operation
258+
# will do a lot of the same work required for later artifacts (metal, metal4k, etc)
259+
# so we want the cached output from that run to persist. The later artifacts get
260+
# built in parallel, so we need to be able to access the cache by multiple processes,
261+
# so for those we'll set `snapshot=on` so that each will get their own disk image.
262+
# This is OK because we don't checkpoint (cache) any of those stages.
263+
[ "${image_type}" == "qemu" ] && snapshot="off" || snapshot="on"
264+
runvm_with_cache_snapshot "$snapshot" -- /usr/lib/coreos-assembler/runvm-osbuild \
265+
--config "${image_for_disk_json}" \
266+
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
267+
--filepath "${path}.tmp" "${osbuild_extra_args[@]}"
278268

279269
if [[ $secure_execution -eq "1" ]]; then
280270
# SecureVM (holding Universal Key for all IBM Z Mainframes) requires scripts to execute genprotimg

0 commit comments

Comments
 (0)