]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Changed execution for liveboot_set_test_state.sh
authorMarjan Schiller <marjan.schiller@profitbricks.com>
Thu, 13 Jun 2013 13:51:50 +0000 (15:51 +0200)
committerMarjan Schiller <marjan.schiller@profitbricks.com>
Thu, 13 Jun 2013 13:51:50 +0000 (15:51 +0200)
liveboot_set_test_state.sh

index 743e22cc26625a233b20d009a2a319bd8da6e627..8a933923a648d77e5cb06aa4180d2d78e62aba2b 100755 (executable)
@@ -26,6 +26,13 @@ git checkout $GIT_BRANCH
 ./liveboot_test_reporter.py $BUILD_NUMBER $TEST_STATE
 EOF
 
-bash -x $BUILD_SCRIPT
+set -e
+trap set_failure INT TERM EXIT ERR KILL STOP HUP ABRT PIPE CHLD
+
+echo "sudo pbuilder --execute --bindmounts /srv/build/ -- $BUILD_SCRIPT" > ${BUILD_SCRIPT}_sudo
+bash -x ${BUILD_SCRIPT}_sudo
+rm $BUILD_SCRIPT ${BUILD_SCRIPT}_sudo
+
+trap - INT TERM EXIT
 
 figlet "OK"
\ No newline at end of file