From e22310def955457bb3bb870d814ac01440ed099f Mon Sep 17 00:00:00 2001 From: Bartosz Bezak Date: Tue, 3 Mar 2026 12:05:06 +0100 Subject: [PATCH] Fix manifest push failure handling Signed-off-by: Bartosz Bezak --- .../multiarch-manifests-pipefail-9b860f83d0f93f1e.yaml | 6 ++++++ tools/multiarch-manifests.sh | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/multiarch-manifests-pipefail-9b860f83d0f93f1e.yaml diff --git a/releasenotes/notes/multiarch-manifests-pipefail-9b860f83d0f93f1e.yaml b/releasenotes/notes/multiarch-manifests-pipefail-9b860f83d0f93f1e.yaml new file mode 100644 index 000000000..c1b685c80 --- /dev/null +++ b/releasenotes/notes/multiarch-manifests-pipefail-9b860f83d0f93f1e.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes CI multiarch manifest creation by setting ``pipefail`` in the + manifest script. Failures from ``docker manifest create`` or + ``docker manifest push`` now fail the job even when piped to ``tee``. diff --git a/tools/multiarch-manifests.sh b/tools/multiarch-manifests.sh index 97cf3b96c..ec08c4b39 100755 --- a/tools/multiarch-manifests.sh +++ b/tools/multiarch-manifests.sh @@ -1,15 +1,16 @@ #!/usr/bin/env bash # Script used by the Image build workflow to build & push multiarch manifests. -set -ex +set -o errexit +set -o xtrace +set -o pipefail mkdir -p logs images=$(cat all-pushed-images.txt | sort | uniq) # Filter out Ubuntu and Rocky Bifrost images manifest_images=$(echo "$images" \ - | grep -E '.*-(amd64|aarch64)$' \ - | sed -E 's/-(amd64|aarch64)$//' \ + | sed -nE 's/-(amd64|aarch64)$//p' \ | sort | uniq) if [ -z "$manifest_images" ]; then