File tree Expand file tree Collapse file tree
roles/generate-jenkins/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -820,7 +820,9 @@ pipeline {
820820 for i in "${CACHE[@]}"; do
821821 docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
822822 done
823- wait
823+ for p in $(jobs -p); do
824+ wait "$p" || { echo "job $p failed" >&2 ; exit 1; }
825+ done
824826 fi
825827 '''
826828 }
@@ -888,7 +890,9 @@ pipeline {
888890 for i in "${CACHE[@]}"; do
889891 docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
890892 done
891- wait
893+ for p in $(jobs -p); do
894+ wait "$p" || { echo "job $p failed" >&2 ; exit 1; }
895+ done
892896 fi
893897 '''
894898 }
@@ -951,7 +955,9 @@ pipeline {
951955 for i in "${CACHE[@]}"; do
952956 docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} &
953957 done
954- wait
958+ for p in $(jobs -p); do
959+ wait "$p" || { echo "job $p failed" >&2 ; exit 1; }
960+ done
955961 fi
956962 '''
957963 }
You can’t perform that action at this time.
0 commit comments