[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: the job name/number should be part of the session name so we can kill all previous sessions from that job easily

Holger Levsen holger at moszumanska.debian.org
Mon Dec 28 15:05:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch h01ger/WIP-archlinux-job-session-names
in repository jenkins.debian.net.

commit 3f25e84e2259a42744e173a1d92fbcf604b911eb
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Dec 28 16:03:50 2015 +0100

    reproducible archlinux: the job name/number should be part of the session name so we can kill all previous sessions from that job easily
---
 bin/jenkins_node_wrapper.sh             |  2 +-
 bin/reproducible_build_archlinux_pkg.sh | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh
index ebf61ef..f7fda72 100755
--- a/bin/jenkins_node_wrapper.sh
+++ b/bin/jenkins_node_wrapper.sh
@@ -110,7 +110,7 @@ elif [[ "$*" =~ reproducible_setup_schroot_archlinux ]] ; then
 elif [[ "$*" =~ reproducible_setup_mock_fedora-23_x86_64 ]] ; then
 	exec /srv/jenkins/bin/reproducible_setup_mock.sh fedora-23 x86_64 ; croak "Exec failed";
 elif [ "$1" = "/srv/jenkins/bin/reproducible_build_archlinux_pkg.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
-	exec /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh "$2" "$3" "$4" "$5" ; croak "Exec failed";
+	exec /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh "$2" "$3" "$4" "$5" "$6" ; croak "Exec failed";
 elif [ "$1" = "/srv/jenkins/bin/reproducible_build_rpm.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
 	exec /srv/jenkins/bin/reproducible_build_rpm.sh "$2" "$3" "$4" "$5" "$6" "$7" ; croak "Exec failed";
 elif [ "$*" = "some_jenkins_job_name" ] ; then
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 3c769c4..88ef329 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -229,7 +229,7 @@ remote_build() {
 		sleep ${SLEEPTIME}m
 		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}
+	ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh $BUILDNR $BUILDER_JOB $REPOSITORY ${SRCPACKAGE} ${TMPDIR}
 	RESULT=$?
 	if [ $RESULT -ne 0 ] ; then
 		ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true
@@ -274,13 +274,15 @@ trap cleanup_all INT TERM EXIT
 #
 if [ "$1" = "" ] ; then
 	MODE="master"
-	TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX)  # where everything actually happens
+	BUILDER_JOB="${JOB_NAME#reproducible_builder_archlinux}"
+	TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux$BUILDER_JOB-XXXXXXXX)  # where everything actually happens
 	cd $TMPDIR
 elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
 	MODE="$1"
-	REPOSITORY="$2"
-	SRCPACKAGE="$3"
-	TMPDIR="$4"
+	BUILDER_JOB="$2"
+	REPOSITORY="$3"
+	SRCPACKAGE="$4"
+	TMPDIR="$5"
 	[ -d $TMPDIR ] || mkdir -p $TMPDIR
 	cd $TMPDIR
 	mkdir -p b$MODE/$SRCPACKAGE

-- 
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