[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: s#ssh#ssh -o 'Batchmode = yes'#g

Holger Levsen holger at moszumanska.debian.org
Mon Dec 21 19:28:08 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 a2873a511624370acf61701686df013c12298c31
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Dec 21 20:27:39 2015 +0100

    reproducible: s#ssh#ssh -o 'Batchmode = yes'#g
---
 bin/reproducible_build.sh                     | 10 +++++-----
 bin/reproducible_build_archlinux_pkg.sh       | 12 ++++++------
 bin/reproducible_build_rpm.sh                 | 12 ++++++------
 bin/reproducible_freebsd.sh                   |  2 +-
 bin/reproducible_html_rsync_remote_results.sh |  2 +-
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 119af88..daffb38 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -623,7 +623,7 @@ remote_build() {
 	local NODE=$2
 	local PORT=$3
 	set +e
-	ssh -p $PORT $NODE /bin/true
+	ssh -o "BatchMode = yes" -p $PORT $NODE /bin/true
 	RESULT=$?
 	# abort job if host is down
 	if [ $RESULT -ne 0 ] ; then
@@ -633,7 +633,7 @@ remote_build() {
 		sleep ${SLEEPTIME}m
 		exec /srv/jenkins/bin/abort.sh
 	fi
-	ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR}
+	ssh -o "BatchMode = yes" -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR}
 	RESULT=$?
 	# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
 	if [ $RESULT -eq 148 ] ; then
@@ -641,19 +641,19 @@ remote_build() {
 	elif [ $RESULT -ne 0 ] ; then
 		handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} on ${SUITE}/${ARCH}"
 	fi
-	rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
+	rsync -e "ssh -o 'BatchMode = yes' -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
 	RESULT=$?
 	if [ $RESULT -ne 0 ] ; then
 		echo "$(date -u ) - rsync from $NODE failed, sleeping 2m before re-trying..." | tee -a ${RBUILDLOG}
 		sleep 2m
-		rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
+		rsync -e "ssh -o 'BatchMode = yes' -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
 		RESULT=$?
 		if [ $RESULT -ne 0 ] ; then
 			handle_remote_error "when rsyncing remote build #$BUILDNR results from $NODE"
 		fi
 	fi
 	ls -lR $TMPDIR
-	ssh -p $PORT $NODE "rm -r $TMPDIR"
+	ssh -o "BatchMode = yes" -p $PORT $NODE "rm -r $TMPDIR"
 	set -e
 	if [ $BUILDNR -eq 1 ] ; then
 		cat $TMPDIR/b1/build.log >> ${RBUILDLOG}
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 9190f6f..3af8b09 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -220,7 +220,7 @@ remote_build() {
 	local FQDN=$NODE.debian.net
 	local PORT=22
 	set +e
-	ssh -p $PORT $FQDN /bin/true
+	ssh -o "Batchmode = yes" -p $PORT $FQDN /bin/true
 	RESULT=$?
 	# abort job if host is down
 	if [ $RESULT -ne 0 ] ; then
@@ -229,10 +229,10 @@ remote_build() {
 		sleep ${SLEEPTIME}m
 		exec /srv/jenkins/bin/abort.sh
 	fi
-	ssh -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 $REPOSITORY ${SRCPACKAGE} ${TMPDIR}
 	RESULT=$?
 	if [ $RESULT -ne 0 ] ; then
-		ssh -p $PORT $FQDN "rm -r $TMPDIR" || true
+		ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true
 		if [ $RESULT -eq 23 ] ; then
 			echo "$(date -u) - remote job could not end schroot session properly and sent error 23 so we could abort silently."
 			exec /srv/jenkins/bin/abort.sh
@@ -243,19 +243,19 @@ remote_build() {
 			handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} from $REPOSITORY"
 		fi
 	fi
-	rsync -e "ssh -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
+	rsync -e "ssh -o 'Batchmode = yes' -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
 	RESULT=$?
 	if [ $RESULT -ne 0 ] ; then
 		echo "$(date -u ) - rsync from $NODE failed, sleeping 2m before re-trying..."
 		sleep 2m
-		rsync -e "ssh -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
+		rsync -e "ssh -o 'Batchmode = yes' -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
 		RESULT=$?
 		if [ $RESULT -ne 0 ] ; then
 			handle_remote_error "when rsyncing remote build #$BUILDNR results from $NODE"
 		fi
 	fi
 	ls -lR $TMPDIR
-	ssh -p $PORT $FQDN "rm -r $TMPDIR"
+	ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR"
 	set -e
 }
 
diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh
index a2e7598..0dfe877 100755
--- a/bin/reproducible_build_rpm.sh
+++ b/bin/reproducible_build_rpm.sh
@@ -148,7 +148,7 @@ remote_build() {
 	local FQDN=$NODE.debian.net
 	local PORT=22
 	set +e
-	ssh -p $PORT $FQDN /bin/true
+	ssh -o "Batchmode = yes" -p $PORT $FQDN /bin/true
 	RESULT=$?
 	# abort job if host is down
 	if [ $RESULT -ne 0 ] ; then
@@ -157,25 +157,25 @@ remote_build() {
 		sleep ${SLEEPTIME}m
 		exec /srv/jenkins/bin/abort.sh
 	fi
-	ssh -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_rpm.sh $BUILDNR $RELEASE $ARCH $UNIQUEEXT ${SRCPACKAGE} ${TMPDIR}
+	ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_rpm.sh $BUILDNR $RELEASE $ARCH $UNIQUEEXT ${SRCPACKAGE} ${TMPDIR}
 	RESULT=$?
 	if [ $RESULT -ne 0 ] ; then
-		ssh -p $PORT $FQDN "rm -r $TMPDIR" || true
+		ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true
 		handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} from $RELEASE ($ARCH)"
 	fi
-	rsync -e "ssh -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
+	rsync -e "ssh -o 'Batchmode = yes' -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
 	RESULT=$?
 	if [ $RESULT -ne 0 ] ; then
 		echo "$(date -u ) - rsync from $NODE failed, sleeping 2m before re-trying..."
 		sleep 2m
-		rsync -e "ssh -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
+		rsync -e "ssh -o 'Batchmode = yes' -p $PORT" -r $FQDN:$TMPDIR/b$BUILDNR $TMPDIR/
 		RESULT=$?
 		if [ $RESULT -ne 0 ] ; then
 			handle_remote_error "when rsyncing remote build #$BUILDNR results from $NODE"
 		fi
 	fi
 	ls -lR $TMPDIR
-	ssh -p $PORT $FQDN "rm -r $TMPDIR"
+	ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR"
 	set -e
 }
 
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index bafde5c..f101eee 100755
--- a/bin/reproducible_freebsd.sh
+++ b/bin/reproducible_freebsd.sh
@@ -92,7 +92,7 @@ declare -A FREEBSD_VERSION
 declare -A FILES_HTML
 for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
 	set -e
-	RSSH="ssh freebsd-jenkins.debian.net"
+	RSSH="ssh -o 'Batchmode = yes' freebsd-jenkins.debian.net"
 	RSCP="scp -r freebsd-jenkins.debian.net"
 	TMPBUILDDIR=/usr/src
 	$RSSH 'sudo rm -rf /usr/src ; sudo mkdir /usr/src ; sudo chown jenkins /usr/src'  ### this is tmpfs on linux, we should move this to tmpfs on FreeBSD too
diff --git a/bin/reproducible_html_rsync_remote_results.sh b/bin/reproducible_html_rsync_remote_results.sh
index 24000f9..0828be9 100755
--- a/bin/reproducible_html_rsync_remote_results.sh
+++ b/bin/reproducible_html_rsync_remote_results.sh
@@ -16,7 +16,7 @@ rsync_remote_results() {
 		echo "$(date -u) - Starting to rsync results for '$PROJECT'."
 		local RESULTS=$(mktemp --tmpdir=$TEMPDIR -d reproducible-rsync-XXXXXXXXX)
 		# copy the new results from build node to webserver node
-		rsync -r -v -e ssh profitbricks-build3-amd64.debian.net:$BASE/$PROJECT/ $RESULTS
+		rsync -r -v -e "ssh -o 'Batchmode = yes'" profitbricks-build3-amd64.debian.net:$BASE/$PROJECT/ $RESULTS
 		chmod 775 $RESULTS
 		# move old results out of the way
 		mv $BASE/$PROJECT ${RESULTS}.tmp

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