[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: allow remote cleanup
Holger Levsen
holger at moszumanska.debian.org
Sun Aug 30 21:47:20 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 a3f5858dd60c79c3756291561ea447ea0be6019c
Author: Holger Levsen <holger at layer-acht.org>
Date: Sun Aug 30 23:46:59 2015 +0200
reproducible: allow remote cleanup
---
bin/jenkins_node_wrapper.sh | 2 ++
bin/reproducible_build.sh | 10 +++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh
index c121018..aabc7c3 100755
--- a/bin/jenkins_node_wrapper.sh
+++ b/bin/jenkins_node_wrapper.sh
@@ -71,6 +71,8 @@ elif [ "$1" = "/srv/jenkins/bin/reproducible_build.sh" ] && ( [ "$2" = "1" ] ||
exec /srv/jenkins/bin/reproducible_build.sh $2 $3 $4 $5 ; croak "Exec failed";
elif [[ "$*" =~ rsync\ --server\ --sender\ .*\ .\ /srv/reproducible-results/tmp.* ]] ; then
exec rsync --server --sender .* . $6 ; croak "Exec failed";
+elif [[ "$*" =~ rm\ -r\ /srv/reproducible-results/tmp.* ]] ; then
+ exec rm -r $3 ; croak "Exec failed";
elif [ "$*" = "reproducible_setup_pbuilder_unstable_armhf_bpi0" ] ; then
exec /srv/jenkins/bin/reproducible_setup_pbuilder.sh unstable ; croak "Exec failed";
elif [ "$*" = "reproducible_maintenance_armhf_bpi0" ] ; then
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 22bf74d..8bc5928 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -100,9 +100,9 @@ cleanup_all() {
# XXX quite ugly: this is just needed to get the correct value of the
# compressed files in the html. It's cheap and quite safe so, *shrugs*...
gen_package_html $SRCPACKAGE
+ cd
+ rm -r $TMPDIR
fi
- cd
- rm -r $TMPDIR
if ! $BAD_LOCKFILE ; then rm -f $LOCKFILE ; fi
}
@@ -509,7 +509,7 @@ check_buildinfo() {
else
ssh -p $PORT1 $NODE1 /srv/jenkins/bin/reproducible_build.sh 1 ${SRCPACKAGE} ${SUITE} ${TMPDIR}
rsync -e "ssh -p $PORT1" -r $NODE1:$TMPDIR/b1 .
- ssh -p $PORT1 $NODE1 "rm -r $TMPDIR/b1"
+ ssh -p $PORT1 $NODE1 "rm -r $TMPDIR"
fi
grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b1/$BUILDINFO > $TMPFILE1
set +e
@@ -531,7 +531,7 @@ build_rebuild() {
else
ssh -p $PORT1 $NODE1 /srv/jenkins/bin/reproducible_build.sh 1 ${SRCPACKAGE} ${SUITE} ${TMPDIR}
rsync -e "ssh -p $PORT1" -r $NODE1:$TMPDIR/b1 .
- ssh -p $PORT1 $NODE1 "rm -r $TMPDIR/b1"
+ ssh -p $PORT1 $NODE1 "rm -r $TMPDIR"
fi
if [ -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
# the first build did not FTBFS, try rebuild it.
@@ -544,7 +544,7 @@ build_rebuild() {
else
ssh -p $PORT2 $NODE2 /srv/jenkins/bin/reproducible_build.sh 2 ${SRCPACKAGE} ${SUITE} ${TMPDIR}
rsync -e "ssh -p $PORT2" -r $NODE2:$TMPDIR/b2 .
- ssh -p $PORT2 $NODE2 "rm -r $TMPDIR/b2"
+ ssh -p $PORT2 $NODE2 "rm -r $TMPDIR"
fi
if [ -f b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
# both builds were fine, i.e., they did not FTBFS.
--
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