[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] make abort_if_bug_is_still_open() work with remote jobs

Holger Levsen gitlab at salsa.debian.org
Tue Oct 2 11:56:20 BST 2018


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
f4193d2e by Holger Levsen at 2018-10-02T10:56:05Z
make abort_if_bug_is_still_open() work with remote jobs

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/common-functions.sh


Changes:

=====================================
bin/common-functions.sh
=====================================
@@ -56,8 +56,15 @@ if [ "${0:0:5}" != "/tmp/" ] ; then
 		echo "Do not run this as root."
 		exit 1
 	fi
+	# - for remote jobs we need to check against $SSH_ORIGINAL_COMMAND
+	# - for local jobs this would be $JOB_NAME
+	if [ -n "$JOB_NAME" ] ; then
+		WHOAREWE=$JOB_NAME
+	else
+		WHOAREWE=${SSH_ORIGINAL_COMMAND}
+	fi
 	# abort certain jobs if we know they will fail due to certain bugsā€¦
-	case $JOB_NAME in
+	case $WHOAREWE in
 		#chroot-installation_*_install_design-desktop-*)
 		#	for BLOCKER in 869155 867695 ; do
 		#		abort_if_bug_is_still_open $BLOCKER
@@ -85,7 +92,7 @@ if [ "${0:0:5}" != "/tmp/" ] ; then
 	chmod +x $TTT
 	echo "===================================================================================="
 	echo
-	echo "$(date -u) - running $0 ($JOB_NAME) on $(hostname) now."
+	echo "$(date -u) - running $0 (for job $WHOAREWE) on $(hostname) now."
 	echo
 	echo "To learn to understand this, git clone https://salsa.debian.org/qa/jenkins.debian.net.git"
 	echo "and then have a look at the files README, INSTALL, CONTRIBUTING and maybe TODO."



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/f4193d2e734467a7f9b2b3b8dce7485e19df0d57

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/f4193d2e734467a7f9b2b3b8dce7485e19df0d57
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20181002/bbe869c7/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list