[Qa-jenkins-scm] [jenkins.debian.net] 01/01: use exec to start abort.sh to invoke it from within the current job run
Holger Levsen
holger at moszumanska.debian.org
Wed Sep 16 08:52:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit cf25c53644c7d88eca1d183c295863ec438937e4
Author: Holger Levsen <holger at layer-acht.org>
Date: Wed Sep 16 10:52:38 2015 +0200
use exec to start abort.sh to invoke it from within the current job run
---
bin/abort.sh | 1 +
bin/find_dpkg_trigger_cycles.sh | 2 +-
bin/jenkins_master_wrapper.sh | 2 +-
bin/reproducible_build.sh | 4 ++--
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/bin/abort.sh b/bin/abort.sh
index 81b554a..cb25486 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 02ac7e4..6a2cd0d 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 f7eaaf4..b8d08e4 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 da3a9f4..d6c4578 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=$?
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list