[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: refactor

Holger Levsen gitlab at salsa.debian.org
Thu Jan 31 16:46:19 GMT 2019


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
675941c3 by Holger Levsen at 2019-01-31T16:46:02Z
reproducible: refactor

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


9 changed files:

- bin/jenkins_master_wrapper.sh
- bin/jenkins_node_definitions.sh
- bin/reproducible_build.sh
- bin/reproducible_build_archlinux_pkg.sh
- bin/reproducible_maintenance.sh
- bin/reproducible_node_health_check.sh
- bin/reproducible_openwrt.sh
- bin/reproducible_setup_pbuilder.sh
- bin/schroot-create.sh


Changes:

=====================================
bin/jenkins_master_wrapper.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2015-2018 Holger Levsen <holger at layer-acht.org>
+# Copyright 2015-2019 Holger Levsen <holger at layer-acht.org>
 #                2016 Phil Hands <phil at hands.com>
 #           2018      Mattia Rizzolo <mattia at 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


=====================================
bin/jenkins_node_definitions.sh
=====================================
@@ -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/reproducible_build.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2018 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2019 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2018 Mattia Rizzolo <mattia at 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)


=====================================
bin/reproducible_build_archlinux_pkg.sh
=====================================
@@ -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=$?


=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -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/reproducible_node_health_check.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2018 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2019 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2018 Mattia Rizzolo <mattia at 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


=====================================
bin/reproducible_openwrt.sh
=====================================
@@ -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/reproducible_setup_pbuilder.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2018 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2019 Holger Levsen <holger at layer-acht.org>
 #           ©    2018 Mattia Rizzolo <mattia at 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/schroot-create.sh
=====================================
@@ -1,10 +1,10 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright © 2012-2018 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2012-2019 Holger Levsen <holger at layer-acht.org>
 #           ©      2013 Antonio Terceiro <terceiro at debian.org>
 #           ©      2014 Joachim Breitner <nomeata at debian.org>
-#           © 2015-2018 MAttia Rizzolo <mattia at debian.org>
+#           © 2015-2018 Mattia Rizzolo <mattia at 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



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/675941c32e82140dca49cbb8717644815b4978d1

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/675941c32e82140dca49cbb8717644815b4978d1
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190131/8068b9f9/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list