summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build_archlinux_pkg.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2016-06-03 09:16:46 +0000
committerHolger Levsen <holger@layer-acht.org>2016-06-03 11:19:06 +0200
commitbb5d23e64622020df5f1d3113940bfe3f4ad34f5 (patch)
tree06dcddddcf2ee4ae95eb95a994c20403003084b4 /bin/reproducible_build_archlinux_pkg.sh
parent014ba6b75f581ea333c4f9324ddc59254e695ab5 (diff)
downloadjenkins.debian.net-bb5d23e64622020df5f1d3113940bfe3f4ad34f5.tar.xz
reproducible archlinux: properly cleanup before aborting the job
Diffstat (limited to 'bin/reproducible_build_archlinux_pkg.sh')
-rwxr-xr-xbin/reproducible_build_archlinux_pkg.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 3c769c4b..bcd43598 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…