diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 8aa90755f39..f310b8c69a3 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -269,7 +269,7 @@ case ${DOCKER_BUILDKIT-0} in # With buildkit we cannot retrieve failed builds. # So we do not allow the main step of a build stage to fail. # Instead we record the exit code in the file STATUS. - THEN_SAVE_STATUS=' ; echo $? > STATUS' + THEN_SAVE_STATUS=' ; echo $? > STATUS; exit 0' # ... and at the beginning of the next build stage, # we check the status and exit with an error status. CHECK_STATUS_THEN=' STATUS=$(cat STATUS 2>/dev/null); case "$STATUS" in ""|0) ;; *) exit $STATUS;; esac;'