[Qa-jenkins-scm] [jenkins.debian.net] 01/01: let jenkins-test-vm do some work (modified by h01ger)

Holger Levsen holger at moszumanska.debian.org
Fri Dec 11 18:14:10 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 04ed7b1fdd54f87fb6a1bf4d1138200e5ee5b3ed
Author: Philip Hands <phil at hands.com>
Date:   Fri Dec 11 18:22:15 2015 +0100

    let jenkins-test-vm do some work (modified by h01ger)
---
 bin/common-functions.sh |  8 ++------
 update_jdn.sh           | 14 +++++++++++++-
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index 1f2715e..b79c538 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -18,10 +18,6 @@ common_cleanup() {
 common_init() {
 # check whether this script has been started from /tmp already
 if [ "${0:0:5}" != "/tmp/" ] ; then
-	if [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
-		echo "$(date -u) - running on $HOSTNAME, exiting successfully and cleanly immediatly."
-		exit 0
-	fi
 	# check that we are not root
 	if [ $(id -u) -eq 0 ] ; then
 		echo "Do not run this as root."
@@ -60,14 +56,14 @@ else
 	fi
 	if [ -z "$MIRROR" ]; then
 		case $HOSTNAME in
-			jenkins|profitbricks-build?-amd64)		export MIRROR=http://ftp.de.debian.org/debian ;;
+			jenkins|jenkins-test-vm|profitbricks-build?-amd64)		export MIRROR=http://ftp.de.debian.org/debian ;;
 			bpi0|cbxi4pro0|hb0|wbq0|odxu4|wbd0|rpi2b)	export MIRROR=http://ftp.us.debian.org/debian ;;
 			*)						echo "unsupported host, exiting." ; exit 1 ;;
 		esac
 	fi
 	if [ -z "$http_proxy" ]; then
 		case $HOSTNAME in
-			jenkins|profitbricks-build?-amd64)		export http_proxy="http://localhost:3128" ;;
+			jenkins|jenkins-test-vm|profitbricks-build?-amd64)		export http_proxy="http://localhost:3128" ;;
 			bpi0|cbxi4pro0|hb0|wbq0|odxu4|wbd0|rpi2b)	export http_proxy="http://10.0.0.15:8000/" ;;
 			*)						echo "unsupported host, exiting." ; exit 1 ;;
 		esac
diff --git a/update_jdn.sh b/update_jdn.sh
index d4c1879..7c3ef17 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -18,6 +18,17 @@ explain() {
 	echo "$HOSTNAME: $1"
 }
 
+conditional_disable() {
+	if [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
+		case "$1" in
+			piuparts.yaml) return 1;;
+			d-i.yaml) return 1;;
+			*) return 0;;
+		esac
+	fi
+	return 1
+}
+
 echo "--------------------------------------------"
 explain "$(date) - begin deployment update."
 
@@ -170,7 +181,7 @@ if [ -f /etc/debian_version ] ; then
 			zsh
 			"
 		case $HOSTNAME in
-			jenkins|profitbricks-build?-amd64) DEBS="$DEBS squid3" ;;
+			jenkins|jenkins-test-vm|profitbricks-build?-amd64) DEBS="$DEBS squid3" ;;
 			*) ;;
 		esac
 		# needed to run the 2nd reproducible builds nodes in the future...
@@ -439,6 +450,7 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
 	rm -f $TMPFILE
 	for config in *.yaml ; do
 		if [ $config -nt $STAMP ] || [ ! -f $STAMP ] ; then
+			conditional_disable $config && continue
 			$JJB update $config
 		else
 			echo "$config has not changed, nothing to do."

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