Commit a6f9e02f authored by David Mondou's avatar David Mondou
Browse files

Fix build_script to exit on failure.

parent 68581a24
......@@ -8,7 +8,7 @@ curl > /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
#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
#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