]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Fixed test state script.
authorMarjan Schiller <marjan.schiller@profitbricks.com>
Thu, 13 Jun 2013 15:21:31 +0000 (17:21 +0200)
committerMarjan Schiller <marjan.schiller@profitbricks.com>
Thu, 13 Jun 2013 15:21:31 +0000 (17:21 +0200)
liveboot_set_test_state.sh

index 8a933923a648d77e5cb06aa4180d2d78e62aba2b..233fc804bae5930ebecab5fe34f33637410e7c1c 100755 (executable)
@@ -3,9 +3,9 @@
 
 set -e
 
-if [ -z "${BUILD_NUMBER}" ]
+if [ -z "${LIVEBOOT_BUILD_NUMBER}" ]
 then
-    echo "\$BUILD_NUMBER is empty, not using Jenkins? Please export manually!"
+    echo "\$LIVEBOOT_BUILD_NUMBER is empty, not using Jenkins? Please export manually!"
     exit 1
 fi
 
@@ -19,20 +19,14 @@ fi
 BUILD_SCRIPT=$(mktemp)
 cat > $BUILD_SCRIPT <<-EOF
 cd /srv/build
-rm liveboot_test_state -rf
+rm /srv/build/liveboot_test_state -rf
 git clone git://git/ri/liveboot.git liveboot_test_state
-cd liveboot_test_state
+cd /srv/build/liveboot_test_state/modules
 git checkout $GIT_BRANCH
-./liveboot_test_reporter.py $BUILD_NUMBER $TEST_STATE
+./liveboot_test_reporter.py $LIVEBOOT_BUILD_NUMBER $TEST_STATE
 EOF
 
-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
+sudo bash -x ${BUILD_SCRIPT}
 
-trap - INT TERM EXIT
+figlet "OK"
 
-figlet "OK"
\ No newline at end of file