summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-23 15:20:15 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-23 15:20:15 +0200
commit8c7fa2efc26d05ad86c15bcd58814fd6efd820e7 (patch)
treea199dc2059a343158df81c706755a5b626d450f7
parentb33a849375e4b8de1f8440a11d764e111d2fcf43 (diff)
downloadjenkins.debian.net-8c7fa2efc26d05ad86c15bcd58814fd6efd820e7.tar.xz
reproducible: handle_race_condition(): do cleanup before aborting
-rwxr-xr-xbin/reproducible_build.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index a03e66b9..f1a25d09 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -49,6 +49,9 @@ handle_race_condition() {
SAVE_ARTIFACTS=0
if [ ! -z "$NOTIFY" ] ; then NOTIFY="failure" ; fi
fi
+ # cleanup
+ rm -r $TMPDIR || true
+ if ! $BAD_LOCKFILE ; then rm -f $LOCKFILE ; fi
exec /srv/jenkins/bin/abort.sh
exit 0
}