[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: properly cleanup before aborting the job

Holger Levsen holger at layer-acht.org
Fri Jun 3 09:19:23 UTC 2016


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 bb5d23e64622020df5f1d3113940bfe3f4ad34f5
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Fri Jun 3 09:16:46 2016 +0000

    reproducible archlinux: properly cleanup before aborting the job
---
 bin/reproducible_build_archlinux_pkg.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 3c769c4..bcd4359 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -35,6 +35,7 @@ handle_remote_error() {
 	echo "$(date -u ) - $MESSAGE" | tee -a /var/log/jenkins/reproducible-remote-error.log
 	echo "Sleeping 5m before aborting the job."
 	sleep 5m
+	cleanup_all
 	exec /srv/jenkins/bin/abort.sh
 	exit 0
 }
@@ -227,6 +228,7 @@ remote_build() {
 		SLEEPTIME=$(echo "$BUILDNR*$BUILDNR*5"|bc)
 		echo "$(date -u) - $NODE seems to be down, sleeping ${SLEEPTIME}min before aborting this job."
 		sleep ${SLEEPTIME}m
+		cleanup_all
 		exec /srv/jenkins/bin/abort.sh
 	fi
 	ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh $BUILDNR $REPOSITORY ${SRCPACKAGE} ${TMPDIR}
@@ -235,9 +237,11 @@ remote_build() {
 		ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true
 		if [ $RESULT -eq 23 ] ; then
 			echo "$(date -u) - remote job could not end schroot session properly and sent error 23 so we could abort silently."
+			cleanup_all
 			exec /srv/jenkins/bin/abort.sh
 		elif [ $RESULT -eq 42 ] ; then
 			echo "$($date -u) - sigh, failure after not being able to verify pgp signatures. work to debug why ahead."
+			cleanup_all
 			exec /srv/jenkins/bin/abort.sh
 		else
 			# FIXME: atm this is never reached…

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