diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-12-21 16:36:54 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-21 16:36:54 +0100 |
commit | 321db9510cc2dafb785a3ec6d7d7068790f9e255 (patch) | |
tree | 13db6766549e1d8a5716966af8b174eb3901dd8e /bin | |
parent | 23a639845945e7ba735a4225274cd31ee70d9731 (diff) | |
download | jenkins.debian.net-321db9510cc2dafb785a3ec6d7d7068790f9e255.tar.xz |
reproducible archlinux: abort silently if schroot session unmounting fails on pgg verification failure… (work in progress)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index 3706567a..bbeafcfb 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 |