Skip to content

Commit ea21a9b

Browse files
authored
Merge pull request #373 from lool/silent-pipeline-failures
Fix silent pipeline failures
2 parents 6ac9117 + f203187 commit ea21a9b

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

debos-recipes/qualcomm-linux-debian-flash.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,9 @@ actions:
446446
[ -f "${contents_xml}" ] || continue
447447
spinor_dir_name="$(basename "${spinor_dir}")"
448448
board="${spinor_dir_name#flash_}"; board="${board%_spinor}"
449-
xmlstarlet sel -t -m "//product_info/chipid" -v "@storage_type" -n "${contents_xml}" | \
450-
tr '[:upper:]' '[:lower:]' | sort -u | \
449+
# extract storage types to variable to avoid silent pipeline failure
450+
storage_types=$(xmlstarlet sel -t -m "//product_info/chipid" -v "@storage_type" -n "${contents_xml}")
451+
echo "$storage_types" | tr '[:upper:]' '[:lower:]' | sort -u | \
451452
while read -r storage; do
452453
[ "${storage}" = "spinor" ] && continue
453454
target_dir="${ARTIFACTDIR}/flash_${board}_${storage}"

debos-recipes/qualcomm-linux-debian-image.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ actions:
108108
# when building under debos, /sys/firmware/efi is not always present, so
109109
# the u-boot-efi-dtb postinst doesn't install an initial copy of the
110110
# DTBs; do this once here
111-
latest_kernel="$(
112-
linux-version list | linux-version sort --reverse | head -1)"
111+
# extract kernel list to variable to avoid silent pipeline failure
112+
kernel_list=$(linux-version list)
113+
latest_kernel=$(echo "$kernel_list" | linux-version sort --reverse | head -1)
113114
dtb_path="/usr/lib/linux-image-${latest_kernel}"
114115
cp -LRT "$dtb_path" "/boot/efi/dtb"
115116
@@ -147,8 +148,9 @@ actions:
147148
set -eux
148149
sector_size="{{if eq $imagetype "ufs"}}4096{{else}}512{{end}}"
149150
image="{{ $image }}"
150-
fdisk -b "${sector_size}" -l "${image}" |
151-
sed -n '1,/^Device/ d; p' |
151+
# extract fdisk output to variable to avoid silent pipeline failure
152+
fdisk_output=$(fdisk -b "${sector_size}" -l "${image}")
153+
echo "$fdisk_output" | sed -n '1,/^Device/ d; p' |
152154
while read name start end sectors rest; do
153155
dd if="${image}" of="${ARTIFACTDIR}/${name}" \
154156
bs="${sector_size}" skip="${start}" count="${sectors}"

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,9 @@ actions:
374374
# this image has pulled a more recent kernel, it's probably to gain
375375
# support for new hardware which would happen through new or updated dtbs
376376
# only in that new kernel, so use the latest dtbs
377-
latest_kernel="$(
378-
ls -d "$ROOTDIR"/usr/lib/linux-image-* | sort -V | tail -1)"
377+
# list kernel directories to avoid silent pipeline failure
378+
kernel_dirs=$(ls -d "$ROOTDIR"/usr/lib/linux-image-*)
379+
latest_kernel=$(echo "$kernel_dirs" | sort -V | tail -1)
379380
# transform pathnames to strip the leading ./
380381
tar \
381382
-C "${latest_kernel}" \

0 commit comments

Comments
 (0)