[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible: unregister build if the node is down

Holger Levsen holger at moszumanska.debian.org
Wed Sep 16 11:24:12 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 49e25646f08cec89adc3db015c58f8edcc5a2b95
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Sep 16 13:24:05 2015 +0200

    reproducible: unregister build if the node is down
---
 bin/reproducible_build.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index d6c4578..da10dd5 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -264,7 +264,14 @@ handle_reproducible() {
 	fi
 }
 
+unregister_build() {
+	# unregister this build so it will immeditiatly tried again
+	sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='', builder='' WHERE package_id='$SRCPKGID'"
+	NOTIFY=""
+}
+
 handle_unhandled() {
+	unregister_build
 	MESSAGE="$BUILD_URL met an unhandled $1, please investigate."
 	echo "$MESSAGE"
 	irc_msg "$MESSAGE"
@@ -540,6 +547,7 @@ remote_build() {
 	# 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."
+		unregister_build
 		sleep 23m
 		exec /srv/jenkins/bin/abort.sh
 	fi

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