From dfefa2d3ad9c392b4c18b2d6b627aa77382bc08d Mon Sep 17 00:00:00 2001 From: Olivier Thomann Date: Wed, 15 Sep 2021 10:24:57 -0400 Subject: [PATCH] Fail the script if a command fails --- scripts/build_image_buildkit.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build_image_buildkit.sh b/scripts/build_image_buildkit.sh index d5d0b28..1a24555 100644 --- a/scripts/build_image_buildkit.sh +++ b/scripts/build_image_buildkit.sh @@ -7,6 +7,8 @@ # source <(curl -sSL "https://raw.githubusercontent.com/open-toolchain/commons/master/scripts/build_image_buildkit.sh") # ------------------ # source: https://raw.githubusercontent.com/open-toolchain/commons/master/scripts/build_image_buildkit.sh +# fail the script if a command fails +set -eou pipefail # This script does build a Docker image into IBM Container Service private image registry using Buildkit buildctl - https://github.com/moby/buildkit#building-a-dockerfile-with-buildctl # Minting image tag using format: BUILD_NUMBER-BRANCH-COMMIT_ID-TIMESTAMP