Commit 675941c3 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible: refactor

parent 5a991a76
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
#!/bin/bash
# vim: set noexpandtab:

# Copyright 2015-2018 Holger Levsen <holger@layer-acht.org>
# Copyright 2015-2019 Holger Levsen <holger@layer-acht.org>
#                2016 Phil Hands <phil@hands.com>
#           2018      Mattia Rizzolo <mattia@debian.org>
# released under the GPLv=2
@@ -27,7 +27,7 @@ if [ "${NODE_NAME%.*}" = "$NODE_NAME" ]; then
	export NODE_NAME="${NODE_NAME}.debian.net"
fi

get_node_ssh_port $NODE_NAME
get_node_information $NODE_NAME

# don't try to fetch artifacts by default
RETRIEVE_ARTIFACTS=no
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ osuosl-build174-amd64.debian.net"

# return the ports sshd is listening on
NODE_RUN_IN_THE_FUTURE=false
get_node_ssh_port() {
get_node_information() {
	local NODE_NAME=$1
	case "$NODE_NAME" in
	  bbx15*)
+4 −4
Original line number Diff line number Diff line
#!/bin/bash
# vim: set noexpandtab:

# Copyright 2014-2018 Holger Levsen <holger@layer-acht.org>
# Copyright 2014-2019 Holger Levsen <holger@layer-acht.org>
#         © 2015-2018 Mattia Rizzolo <mattia@debian.org>
# released under the GPLv=2

@@ -727,9 +727,9 @@ check_node_is_up() {

check_nodes_are_up() {
	local SLEEPTIME=30
	get_node_ssh_port $NODE1
	get_node_information $NODE1
	check_node_is_up $NODE1 $PORT $SLEEPTIME
	get_node_ssh_port $NODE2
	get_node_information $NODE2
	check_node_is_up $NODE2 $PORT $SLEEPTIME
}

@@ -737,7 +737,7 @@ remote_build() {
	local BUILDNR=$1
	local NODE=$2
	log_info "Preparing to do remote build '$BUILDNR' on $NODE."
	get_node_ssh_port $NODE
	get_node_information $NODE
	# sleep 15min if first node is down
	# but 1h if the 2nd node is down
	local SLEEPTIME=$(echo "$BUILDNR*$BUILDNR*15"|bc)
+1 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ remote_build() {
	local BUILDNR=$1
	local NODE=$2
	local FQDN=$NODE.debian.net
	get_node_ssh_port $NODE
	get_node_information $NODE
	set +e
	ssh -o "Batchmode = yes" -p $PORT $FQDN /bin/true
	RESULT=$?
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ for s in $SUITES ; do
			exit 1
		fi
		. /srv/jenkins/bin/jenkins_node_definitions.sh
		get_node_ssh_port "$HOSTNAME"
		get_node_information "$HOSTNAME"
		if "$NODE_RUN_IN_THE_FUTURE" ; then
			echo "This node is reported to run in the future, configuring APT to ignore the Release file expiration..."
			echo 'Acquire::Check-Valid-Until "false";' > "$CHPATH/$distname/etc/apt/apt.conf.d/398future"
Loading