Skip to content

Commit c17d406

Browse files
committed
updated workflows
1 parent fcdaae5 commit c17d406

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

scripts/build_azl3_arm_raw.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,23 @@ build_azl3_raw_image() {
232232
cd "$WORKING_DIR"
233233
echo "Current working directory: $(pwd)"
234234

235-
output=$( sudo -S ./os-image-composer build image-templates/azl3-x86_64-minimal-raw.yml 2>&1)
235+
# Temporarily disable exit on error for the build command to capture output
236+
set +e
237+
output=$( sudo -S ./os-image-composer build image-templates/ubuntu24-x86_64-minimal-raw.yml 2>&1)
238+
build_exit_code=$?
239+
set -e
240+
236241
# Check for the success message in the output
237-
if echo "$output" | grep -q "image build completed successfully"; then
242+
if [ $build_exit_code -eq 0 ] && echo "$output" | grep -q "image build completed successfully"; then
238243
echo "AZL3 raw Image build passed."
239244
if [ "$RUN_QEMU_TESTS" = true ]; then
240245
echo "Running QEMU boot test for AZL3 raw image..."
241246
if run_qemu_boot_test "azl3-x86_64-minimal"; then
242247
echo "QEMU boot test PASSED for AZL3 raw image"
243248
else
244249
echo "QEMU boot test FAILED for AZL3 raw image"
250+
echo "Build output:"
251+
echo "$output"
245252
exit 1
246253
fi
247254
# Clean up after QEMU test to free space

scripts/build_ubuntu24_arm_raw.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,22 @@ build_ubuntu24_raw_image() {
265265
exit 1
266266
fi
267267

268-
output=$( sudo -S ./os-image-composer build image-templates/ubuntu24-arm64-raw.yml 2>&1)
268+
# Temporarily disable exit on error for the build command to capture output
269+
set +e
270+
output=$( sudo -S ./os-image-composer build image-templates/ubuntu24-x86_64-minimal-raw.yml 2>&1)
271+
build_exit_code=$?
272+
set -e
269273
# Check for the success message in the output
270-
if echo "$output" | grep -q "image build completed successfully"; then
274+
if [ $build_exit_code -eq 0 ] && echo "$output" | grep -q "image build completed successfully"; then
271275
echo "Ubuntu 24 raw Image build passed."
272276
if [ "$RUN_QEMU_TESTS" = true ]; then
273277
echo "Running QEMU boot test for Ubuntu 24 raw image..."
274278
if run_qemu_boot_test "minimal-os-image-ubuntu-24.04"; then
275279
echo "QEMU boot test PASSED for Ubuntu 24 raw image"
276280
else
277281
echo "QEMU boot test FAILED for Ubuntu 24 raw image"
282+
echo "Build output:"
283+
echo "$output"
278284
exit 1
279285
fi
280286
# Clean up after QEMU test to free space

0 commit comments

Comments
 (0)