Skip to content

Commit 9eca78d

Browse files
authored
Fix manifest push failure handling (#2193)
Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
1 parent 92ec1f4 commit 9eca78d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes CI multiarch manifest creation by setting ``pipefail`` in the
5+
manifest script. Failures from ``docker manifest create`` or
6+
``docker manifest push`` now fail the job even when piped to ``tee``.

tools/multiarch-manifests.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/usr/bin/env bash
22
# Script used by the Image build workflow to build & push multiarch manifests.
33

4-
set -ex
4+
set -o errexit
5+
set -o xtrace
6+
set -o pipefail
57

68
mkdir -p logs
79
images=$(cat all-pushed-images.txt | sort | uniq)
810

911
# Filter out Ubuntu and Rocky Bifrost images
1012
manifest_images=$(echo "$images" \
11-
| grep -E '.*-(amd64|aarch64)$' \
12-
| sed -E 's/-(amd64|aarch64)$//' \
13+
| sed -nE 's/-(amd64|aarch64)$//p' \
1314
| sort | uniq)
1415

1516
if [ -z "$manifest_images" ]; then

0 commit comments

Comments
 (0)