Commit e8db44dc authored by Pete Tucker's avatar Pete Tucker
Browse files

Merge branch 'fix/failure-to-error' into 'master'

Fix build_script to exit on failure.

See merge request !11
parents 68581a24 a6f9e02f
Pipeline #6483 passed with stages
in 218 minutes and 1 second
......@@ -8,7 +8,7 @@ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /home/che
chmod a+x /home/chewbacca/bin/repo
sudo -i -u chewbacca /bin/bash << EOF
sudo su chewbacca
cd /home/chewbacca
......@@ -64,7 +64,16 @@ bitbake vesta-image-minimal
if [ $? -ne 0 ]; then echo vesta-100 minimal build FAILED; exit 1; fi
EOF
#check the exit code again. We were running as user chewbacca so if
#an exit 1 was executed it will exit user chewbacca and back into root.
#This will require another exit 1 to stop the build and report the error
#as intended
if [ $? -ne 0 ]; then
echo build FAILED
exit 1
else
exit
fi
#clean out old images
rm -rf /artifacts/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment