[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: add support for ssh on different ports

Holger Levsen holger at moszumanska.debian.org
Sun Aug 30 16:14:48 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 d00b49e9a73b87c89377440c602d8a3e71c7943e
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Aug 30 18:14:26 2015 +0200

    reproducible: add support for ssh on different ports
---
 bin/reproducible_build.sh | 21 +++++++++++++--------
 job-cfg/reproducible.yaml |  2 +-
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 7852bb4..8c041c1 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -516,9 +516,9 @@ build_rebuild() {
 	if [ "$MODE" = "legacy" ] ; then
 		first_build
 	else
-		ssh $NODE1 /srv/jenkins/bin/reproducible_build.sh 1 ${SRCPACKAGE} ${SUITE}
-		scp -r $NODE1:$PWD/b1 .
-		ssh $NODE1 "rm -r $PWD/b1"
+		ssh -p $PORT1 $NODE1 /srv/jenkins/bin/reproducible_build.sh 1 ${SRCPACKAGE} ${SUITE}
+		scp -P $PORT1 -r $NODE1:$PWD/b1 .
+		ssh -p $PORT1 $NODE1 "rm -r $PWD/b1"
 	fi
 	if [ -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
 		# the first build did not FTBFS, try rebuild it.
@@ -529,9 +529,9 @@ build_rebuild() {
 		if [ "$MODE" = "legacy" ] ; then
 			second_build
 		else
-			ssh $NODE1 /srv/jenkins/bin/reproducible_build.sh 2
-			scp -r $NODE1:$PWD/b2 .
-			ssh $NODE1 "rm -r $PWD/b2"
+			ssh -p $PORT2 $NODE2 /srv/jenkins/bin/reproducible_build.sh 2
+			scp -P $PORT2 -r $NODE2:$PWD/b2 .
+			ssh -p $PORT2 $NODE2 "rm -r $PWD/b2"
 		fi
 		if [ -f b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
 			# both builds were fine, i.e., they did not FTBFS.
@@ -576,8 +576,13 @@ elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
 	exit 0
 elif [ "$2" != "" ] ; then
 	MODE="ng"
-	NODE1="$1.debian.net"
-	NODE2="$2.debian.net"
+	NODE1="(echo $1 | cut -d ':' -f1).debian.net"
+	NODE2="(echo $2 | cut -d ':' -f1).debian.net"
+	PORT1="(echo $1 | cut -d ':' -f2)"
+	PORT2="(echo $2 | cut -d ':' -f2)"
+	# if no port is given, assume 22
+	if [ "$NODE1" = "${PORT1}.debian.net" ] ; then PORT1 = 22 ; fi
+	if [ "$NODE2" = "${PORT2}.debian.net" ] ; then PORT2 = 22 ; fi
 	# overwrite ARCH for remote builds
 	for i in $ARCHS ; do
 		# try to match ARCH in nodenames
diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml
index c10711e..96c3d52 100644
--- a/job-cfg/reproducible.yaml
+++ b/job-cfg/reproducible.yaml
@@ -837,7 +837,7 @@
         - '{name}_builder_armhf1':
             my_description: 'Try to reproducibly build a scheduled package. This is one of several builder jobs.'
             my_timed: 'H/2 * * * *'
-            my_shell: '/srv/jenkins/bin/reproducible_build.sh wbq0-armhf-rb bpi0-armhf-rb'
+            my_shell: '/srv/jenkins/bin/reproducible_build.sh wbq0-armhf-rb:2225 bpi0-armhf-rb:2222'
             my_recipients: 'qa-jenkins-scm at lists.alioth.debian.org'
             my_node: ''
         - '{name}_coreboot':

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