[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: abort silently if schroot session unmounting fails on pgg verification failure… (work in progress)

Holger Levsen holger at moszumanska.debian.org
Mon Dec 21 15:37:40 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 321db9510cc2dafb785a3ec6d7d7068790f9e255
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Dec 21 16:36:54 2015 +0100

    reproducible archlinux: abort silently if schroot session unmounting fails on pgg verification failure… (work in progress)
---
 bin/reproducible_build_archlinux_pkg.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 3706567..bbeafcf 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -151,7 +151,13 @@ first_build() {
 			schroot --end-session -f -c $SESSION | tee -a $LOG
 			P3RESULT=${PIPESTATUS[0]}
 			if [ $P3RESULT -ne 0 ] ; then
-				exit 23
+				if [ -n "$(grep 'ERROR: One or more PGP signatures could not be verified' $LOG)" ] ; then
+					# abort only
+					exit 42
+				else
+					# fail with notification
+					exit 23
+				fi
 			fi
 		fi
 	fi
@@ -228,8 +234,13 @@ remote_build() {
 	if [ $RESULT -ne 0 ] ; then
 		ssh -p $PORT $FQDN "rm -r $TMPDIR" || true
 		if [ $RESULT -eq 23 ] ; then
-			echo "remote job could not end schroot session properly, failing loudly so we get a pointer for investigations."
+			echo "$(date -u) - remote job could not end schroot session properly, failing loudly so we get a pointer for investigations."
 			exit 1
+		elif [ $RESULT -eq 42 ] ; then
+			echo "$($date -u) - sigh, we know this problem and need to debug it and end the session cleanly. Failing silently for now." # FIXME
+
+			exec /srv/jenkins/bin/abort.sh
+
 		else
 			handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} from $REPOSITORY"
 		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