Skip to content

Commit

Permalink
Explicitly exit with error for failed image build
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Rift <[email protected]>
  • Loading branch information
riftEmber committed Jul 29, 2024
1 parent 7f23010 commit e2b1613
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions util/cron/test-docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ build_image() {
local script="$2"
# Remove any existing image with the tag before building docker image
docker image rm --force $imageName

docker build --push . -t $imageName
BUILD_RESULT=$?
if [ $BUILD_RESULT -ne 0 ]
then
echo "docker build failed for $imageName image"
exit 1
fi

containerid= docker image ls | grep $imageName | awk '{print$3}'
cd ${CHPL_HOME}/util/cron
echo 'writeln("Hello, world!");' > hello.chpl
Expand Down

0 comments on commit e2b1613

Please sign in to comment.