[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian: show offline nodes as offline on nodes health overview page
Holger Levsen
gitlab at salsa.debian.org
Sat Jul 28 08:45:52 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
a22841d0 by Holger Levsen at 2018-07-28T07:45:40Z
reproducible Debian: show offline nodes as offline on nodes health overview page
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
3 changed files:
- bin/reproducible_common.sh
- bin/reproducible_html_nodes_info.sh
- bin/reproducible_worker.sh
Changes:
=====================================
bin/reproducible_common.sh
=====================================
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -41,6 +41,7 @@ ARCHS="amd64 i386 arm64 armhf"
# define Debian build nodes in use
. /srv/jenkins/bin/jenkins_node_definitions.sh
MAINNODE="jenkins" # used by reproducible_maintenance.sh only
+JENKINS_OFFLINE_LIST="/var/lib/jenkins/offline_nodes"
# variables on the nodes we are interested in
BUILD_ENV_VARS="ARCH NUM_CPU CPU_MODEL DATETIME KERNEL" # these also needs to be defined in bin/reproducible_info.sh
=====================================
bin/reproducible_html_nodes_info.sh
=====================================
--- a/bin/reproducible_html_nodes_info.sh
+++ b/bin/reproducible_html_nodes_info.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set noexpandtab:
-# Copyright © 2015-2016 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2015-2018 Holger Levsen <holger at layer-acht.org>
# © 2018 Mattia Rizzolo <mattia at debian.org>
# released under the GPLv=2
@@ -46,6 +46,7 @@ for ARCH in ${ARCHS} ; do
# Debian Reproducible Builds node network but are using for reproducible builds
# tests of other projects…
REPRODUCIBLE_NODES="jenkins"
+
for NODE in $BUILD_NODES ; do
REPRODUCIBLE_NODES="$REPRODUCIBLE_NODES $NODE"
if [ "$NODE" = "profitbricks-build2-i386.debian.net" ] ; then
@@ -68,7 +69,15 @@ for ARCH in ${ARCHS} ; do
armhf) JENKINS_NODENAME=$(echo $NODE | cut -d "-" -f1) ;;
esac
fi
- write_page "<tr><td>$JENKINS_NODENAME</td>"
+ write_page "<tr><td>$JENKINS_NODENAME"
+ # mark offline nodes
+ if [ -f "$JENKINS_OFFLINE_LIST" ]; then
+ if grep -q "$NODE" "$JENKINS_OFFLINE_LIST"; then
+ write_page " is offline</td><td colspan=\"11\"></td>"
+ continue
+ fi
+ fi
+ write_page "</td>"
# health check
URL="https://jenkins.debian.net/view/reproducible/view/Node_maintenance/job/reproducible_node_health_check_${ARCH}_${JENKINS_NODENAME}"
BADGE="$URL/badge/icon"
=====================================
bin/reproducible_worker.sh
=====================================
--- a/bin/reproducible_worker.sh
+++ b/bin/reproducible_worker.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set noexpandtab:
-# Copyright © 2017 Holger Levsen (holger at layer-acht.org)
+# Copyright © 2017-2018 Holger Levsen (holger at layer-acht.org)
# © 2018 Mattia Rizolo <mattia at debian.org>
# released under the GPLv=2
@@ -57,7 +57,6 @@ while true ; do
echo "The lockfile $LOCKFILE is present, thus stopping this"
break
fi
- JENKINS_OFFLINE_LIST="/var/lib/jenkins/offline_nodes"
if [ -f "$JENKINS_OFFLINE_LIST" ]; then
for n in "$NODE1" "$NODE2"; do
if grep -q "$n" "$JENKINS_OFFLINE_LIST"; then
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a22841d08622338c9c9afe70e5c41f3e9b302e6b
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a22841d08622338c9c9afe70e5c41f3e9b302e6b
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/20180728/f6ec0c26/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list