diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-09-16 10:52:38 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-09-16 10:52:38 +0200 |
commit | cf25c53644c7d88eca1d183c295863ec438937e4 (patch) | |
tree | 6e0324ff8fffc0cd86fd5e8155e327b50906e4e3 /bin | |
parent | efe1358e0212cc1dfc8ba7f0f4e48d3e2c675257 (diff) | |
download | jenkins.debian.net-cf25c53644c7d88eca1d183c295863ec438937e4.tar.xz |
use exec to start abort.sh to invoke it from within the current job run
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/abort.sh | 1 | ||||
-rwxr-xr-x | bin/find_dpkg_trigger_cycles.sh | 2 | ||||
-rwxr-xr-x | bin/jenkins_master_wrapper.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_build.sh | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/bin/abort.sh b/bin/abort.sh index 81b554af..cb254864 100755 --- a/bin/abort.sh +++ b/bin/abort.sh @@ -1,3 +1,4 @@ +#!/bin/bash TMPFILE=$(mktemp) curl https://jenkins.debian.net/jnlpJars/jenkins-cli.jar -o $TMPFILE diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh index 02ac7e45..6a2cd0d8 100755 --- a/bin/find_dpkg_trigger_cycles.sh +++ b/bin/find_dpkg_trigger_cycles.sh @@ -173,7 +173,7 @@ curl --retry 3 --retry-delay 10 --globoff "http://binarycontrol.debian.net/?q=&p tmpdir=`mktemp -d --tmpdir="$scratch"` # curl is allowed to fail with exit status 23 because we want to stop # downloading immediately after control.tar.gz has been extracted - ( curl --retry 3 --retry-delay 10 --location --silent "$url" || [ "$?" -eq 23 ] || ( echo "curl failed">&2 && /srv/jenkins/bin/abort.sh ) ) \ + ( curl --retry 3 --retry-delay 10 --location --silent "$url" || [ "$?" -eq 23 ] || ( echo "curl failed">&2 && exec /srv/jenkins/bin/abort.sh ) ) \ | dpkg-deb --ctrl-tarfile /dev/stdin \ | tar -C "$tmpdir" --exclude=./md5sums -x if [ ! -f "$tmpdir/triggers" ]; then diff --git a/bin/jenkins_master_wrapper.sh b/bin/jenkins_master_wrapper.sh index f7eaaf4a..b8d08e4c 100755 --- a/bin/jenkins_master_wrapper.sh +++ b/bin/jenkins_master_wrapper.sh @@ -39,7 +39,7 @@ RESULT=$? if [ $RESULT -ne 0 ] ; then echo "$(date -u) - $NODE_NAME seems to be down, sleeping 15min before aborting this job." sleep 15m - /srv/jenkins/bin/abort.sh + exec /srv/jenkins/bin/abort.sh fi set -e # finally diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index da3a9f4b..d6c4578e 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -273,7 +273,7 @@ handle_unhandled() { else sleep $2 fi - /srv/jenkins/bin/abort.sh + exec /srv/jenkins/bin/abort.sh exit 0 } @@ -541,7 +541,7 @@ remote_build() { if [ $RESULT -ne 0 ] ; then echo "$(date -u) - $NODE seems to be down, sleeping 23min before aborting this job." sleep 23m - /srv/jenkins/bin/abort.sh + exec /srv/jenkins/bin/abort.sh fi ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR} RESULT=$? |