From: Marjan Schiller Date: Thu, 13 Jun 2013 13:13:18 +0000 (+0200) Subject: Added script for setting the test state in the liveboot web interface. X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=fcc94d9c0d9d797784d612664cea6c5d05ce4977;p=profitbricks%2Fjenkins-build-scripts.git Added script for setting the test state in the liveboot web interface. --- diff --git a/liveboot_set_test_state.sh b/liveboot_set_test_state.sh new file mode 100755 index 0000000..743e22c --- /dev/null +++ b/liveboot_set_test_state.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# copyright 2012 Holger Levsen GPL2 licenced, holger@layer-acht.org + +set -e + +if [ -z "${BUILD_NUMBER}" ] +then + echo "\$BUILD_NUMBER is empty, not using Jenkins? Please export manually!" + exit 1 +fi + +if [ -z "${TEST_STATE}" ] +then + echo "\$TEST_STATE is empty, not using Jenkins? Please export manually!" + exit 1 +fi + +# Checkout liveboot repo +BUILD_SCRIPT=$(mktemp) +cat > $BUILD_SCRIPT <<-EOF +cd /srv/build +rm liveboot_test_state -rf +git clone git://git/ri/liveboot.git liveboot_test_state +cd liveboot_test_state +git checkout $GIT_BRANCH +./liveboot_test_reporter.py $BUILD_NUMBER $TEST_STATE +EOF + +bash -x $BUILD_SCRIPT + +figlet "OK" \ No newline at end of file