summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-16 18:27:41 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-16 18:27:41 +0200
commitd546a36c6a784d8c58a6e2813667b7d3a843e5b0 (patch)
treee7172231205ac1518ac490d54257ee16d4b6e555 /bin
parent0c07058a3f9da129a89df9d2780f0d4e778e8ca0 (diff)
downloadjenkins.debian.net-d546a36c6a784d8c58a6e2813667b7d3a843e5b0.tar.xz
reproducible arch: never cleanup $TMPDIR from the node, we need to rsync from it
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build_arch_pkg.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh
index 99aafb62..beff2d66 100755
--- a/bin/reproducible_build_arch_pkg.sh
+++ b/bin/reproducible_build_arch_pkg.sh
@@ -14,9 +14,11 @@ set -e
cleanup_all() {
cd
- # delete main work dir
- rm $TMPDIR -r
- echo "$(date -u) - $TMPDIR deleted."
+ # delete main work dir (only on master)
+ if [ "$MODE" = "master" ] ; then
+ rm $TMPDIR -r
+ echo "$(date -u) - $TMPDIR deleted."
+ fi
# delete makekpg build dir
if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then
rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)
@@ -87,6 +89,7 @@ remote_build() {
ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build_arch_pkg.sh $BUILDNR ${SRCPACKAGE} ${TMPDIR}
RESULT=$?
if [ $RESULT -ne 0 ] ; then
+ ssh -p $PORT $NODE "rm -r $TMPDIR" || true
handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE}"
fi
rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/