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

reproducible: refactor

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 5a991a76
#!/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
......
......@@ -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*)
......
#!/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)
......
......@@ -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=$?
......
......@@ -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"
......
#!/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@mapreri.org>
# released under the GPLv=2
......@@ -106,7 +106,7 @@ fi
#
# (XXX: yes this is hardcoded but meh…)
echo "$(date -u) - testing whether the time is right..."
get_node_ssh_port "$HOSTNAME"
get_node_information "$HOSTNAME"
real_year=2019
year=$(date +%Y)
if "$NODE_RUN_IN_THE_FUTURE"; then
......
......@@ -27,10 +27,10 @@ OPENWRT_TARGET=
# node configuration
GENERIC_NODE1=osuosl-build171-amd64.debian.net
PORT=22
get_node_ssh_port $GENERIC_NODE1
get_node_information $GENERIC_NODE1
GENERIC_PORT1=$PORT
GENERIC_NODE2=osuosl-build172-amd64.debian.net
get_node_ssh_port $GENERIC_NODE2
get_node_information $GENERIC_NODE2
GENERIC_PORT2=$PORT
SSHN1="ssh -p $GENERIC_PORT1 $GENERIC_NODE1"
SSHN2="ssh -p $GENERIC_PORT2 $GENERIC_NODE2"
......
#!/bin/bash
# vim: set noexpandtab:
# Copyright 2014-2018 Holger Levsen <holger@layer-acht.org>
# Copyright 2014-2019 Holger Levsen <holger@layer-acht.org>
# © 2018 Mattia Rizzolo <mattia@debian.org>
# released under the GPLv=2
......@@ -38,7 +38,7 @@ echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02speedup
echo
EOF
. /srv/jenkins/bin/jenkins_node_definitions.sh
get_node_ssh_port "$HOSTNAME"
get_node_information "$HOSTNAME"
if "$NODE_RUN_IN_THE_FUTURE" ; then
cat >> $TMPFILE <<- EOF
echo "Configuring APT to ignore the Release file expiration"
......
#!/bin/bash
# vim: set noexpandtab:
# Copyright © 2012-2018 Holger Levsen <holger@layer-acht.org>
# Copyright © 2012-2019 Holger Levsen <holger@layer-acht.org>
# © 2013 Antonio Terceiro <terceiro@debian.org>
# © 2014 Joachim Breitner <nomeata@debian.org>
# © 2015-2018 MAttia Rizzolo <mattia@debian.org>
# © 2015-2018 Mattia Rizzolo <mattia@debian.org>
# released under the GPLv=2
DEBUG=false
......@@ -137,7 +137,7 @@ bootstrap() {
__END__
. /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";' | sudo tee -a $SCHROOT_TARGET/etc/apt/apt.conf.d/398future >/dev/null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment