summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-30 18:14:26 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-30 18:14:26 +0200
commitd00b49e9a73b87c89377440c602d8a3e71c7943e (patch)
treef01ceab55608dbbc3732953ab79f33d3a285e298 /bin/reproducible_build.sh
parent9b409fff05e58cc0c83fe2250b30287fc0648fd6 (diff)
downloadjenkins.debian.net-d00b49e9a73b87c89377440c602d8a3e71c7943e.tar.xz
reproducible: add support for ssh on different ports
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 7852bb4b..8c041c18 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