[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible: check if a node is up, else sleep 23m and abort the build job

Holger Levsen holger at moszumanska.debian.org
Wed Sep 16 07:52:18 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 b18b4b4f3ae0a70b8800d77fc0130a05ef337bdc
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Sep 16 09:45:41 2015 +0200

    reproducible: check if a node is up, else sleep 23m and abort the build job
---
 bin/reproducible_build.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index d89b8f2..cb8fd6f 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -535,6 +535,14 @@ remote_build() {
 	local NODE=$2
 	local PORT=$3
 	set +e
+	ssh -p $PORT $NODE /bin/true
+	RESULT=$?
+	# abort job if host is down
+	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
+	fi
 	ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR}
 	RESULT=$?
 	# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)

-- 
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