From c90ae53e69340bcf33345a9f6bbc1d677012bca2 Mon Sep 17 00:00:00 2001
From: Holger Levsen
Date: Mon, 12 Jun 2017 16:43:01 +0200
Subject: reproducible Debian: add build nodes health overview page
Signed-off-by: Holger Levsen
---
bin/jenkins_node_definitions.sh | 10 +--
bin/reproducible_nodes_info.sh | 85 ++++++++++++++++++++++
.../reproducible/main_navigation.mustache | 3 +
3 files changed, 93 insertions(+), 5 deletions(-)
diff --git a/bin/jenkins_node_definitions.sh b/bin/jenkins_node_definitions.sh
index e7fede8f..9b4eaf0b 100755
--- a/bin/jenkins_node_definitions.sh
+++ b/bin/jenkins_node_definitions.sh
@@ -17,6 +17,7 @@ cb3a-armhf-rb.debian.net
cbxi4a-armhf-rb.debian.net
cbxi4b-armhf-rb.debian.net
cbxi4pro0-armhf-rb.debian.net
+codethink-sled9-arm64.debian.net
codethink-sled10-arm64.debian.net
codethink-sled11-arm64.debian.net
codethink-sled12-arm64.debian.net
@@ -24,7 +25,6 @@ codethink-sled13-arm64.debian.net
codethink-sled14-arm64.debian.net
codethink-sled15-arm64.debian.net
codethink-sled16-arm64.debian.net
-codethink-sled9-arm64.debian.net
ff2a-armhf-rb.debian.net
ff2b-armhf-rb.debian.net
ff4a-armhf-rb.debian.net
@@ -42,14 +42,14 @@ opi2b-armhf-rb.debian.net
opi2c-armhf-rb.debian.net
p64b-armhf-rb.debian.net
p64c-armhf-rb.debian.net
-profitbricks-build11-amd64.debian.net
-profitbricks-build12-i386.debian.net
-profitbricks-build15-amd64.debian.net
-profitbricks-build16-i386.debian.net
profitbricks-build1-amd64.debian.net
profitbricks-build2-i386.debian.net
profitbricks-build5-amd64.debian.net
profitbricks-build6-i386.debian.net
+profitbricks-build11-amd64.debian.net
+profitbricks-build12-i386.debian.net
+profitbricks-build15-amd64.debian.net
+profitbricks-build16-i386.debian.net
rpi2b-armhf-rb.debian.net
rpi2c-armhf-rb.debian.net
wbd0-armhf-rb.debian.net
diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh
index 2bb686ce..0f797592 100755
--- a/bin/reproducible_nodes_info.sh
+++ b/bin/reproducible_nodes_info.sh
@@ -15,6 +15,91 @@ mkdir -p $TARGET_DIR
TMPFILE_SRC=$(mktemp)
TMPFILE_NODE=$(mktemp)
+#
+# build a static webpage
+#
+VIEW=nodes_health
+PAGE=index_${VIEW}.html
+echo "$(date -u) - starting to write $PAGE page."
+write_page_header $VIEW "Build nodes health overview"
+write_page "This page is still under development. Please provide feedback, which other information (be it from munin or elsewhere) should be displayed and how this page should be split further, eg, the graphs could all be on another page and/or we should split this page into four for the four architectures being tested…
"
+# FIXME: Also either $0 and its job needs to be renamed to include 'html' or the code needs to be moved elsewhere
+write_page ""
+for ARCH in ${ARCHS} ; do
+ write_page "
$ARCH nodes
"
+ write_page ""
+ write_page "Name | maintenance | "
+ for SUITE in ${SUITES} ; do
+ if [ "$SUITE" = "experimental" ] ; then
+ continue
+ fi
+ write_page "schroot setup $SUITE | "
+ done
+ for SUITE in ${SUITES} ; do
+ write_page "pbuilder setup $SUITE | "
+ done
+ write_page "
"
+ for NODE in jenkins $BUILD_NODES ; do
+ if [ -z "$(echo $NODE | grep $ARCH || true)" ] && [ "$NODE" != "jenkins" ] ; then
+ continue
+ elif [ "$NODE" = "jenkins" ] && [ "$ARCH" != "amd64" ] ; then
+ continue
+ fi
+ if [ "$NODE" = "jenkins" ] ; then
+ JENKINS_NODENAME=jenkins
+ NODE="jenkins.debian.net"
+ else
+ case $ARCH in
+ amd64|i386) JENKINS_NODENAME=$(echo $NODE | cut -d "-" -f1-2|sed 's#-build##' ) ;;
+ arm64) JENKINS_NODENAME=$(echo $NODE | cut -d "-" -f1-2|sed 's#-sled##' ) ;;
+ armhf) JENKINS_NODENAME=$(echo $NODE | cut -d "-" -f1) ;;
+ esac
+ fi
+ write_page "$JENKINS_NODENAME | "
+ URL="https://jenkins.debian.net/view/reproducible/view/Node_maintenance/job/reproducible_maintenance_${ARCH}_${JENKINS_NODENAME}"
+ BADGE="$URL/badge/icon"
+ write_page " | "
+ for SUITE in ${SUITES} ; do
+ if [ "$SUITE" = "experimental" ] ; then
+ continue
+ fi
+ URL="https://jenkins.debian.net/view/reproducible/view/Debian_setup_${ARCH}/job/reproducible_setup_schroot_${SUITE}_${ARCH}_${JENKINS_NODENAME}"
+ BADGE="$URL/badge/icon"
+ write_page " | "
+ done
+ for SUITE in ${SUITES} ; do
+ if [ "$JENKINS_NODENAME" = "jenkins" ] ; then
+ write_page " | "
+ else
+ URL="https://jenkins.debian.net/view/reproducible/view/Debian_setup_${ARCH}/job/reproducible_setup_pbuilder_${SUITE}_${ARCH}_${JENKINS_NODENAME}"
+ BADGE="$URL/badge/icon"
+ write_page " | "
+ fi
+ done
+ write_page "
"
+ write_page " | "
+ for GRAPH in jenkins_reproducible_builds cpu memory df ; do
+ if [ "$JENKINS_NODENAME" = "jenkins" ] && [ "$GRAPH" = "jenkins_reproducible_builds" ] ; then
+ write_page " | "
+ else
+ write_page ""
+ write_page " | "
+ fi
+ done
+ write_page " | "
+ write_page "
"
+
+ done
+ write_page "
"
+done
+write_page "
"
+write_page_footer
+publish_page debian
+exit 0
+
+#
+# collect node information
+#
echo "$(date -u) - Collecting information from nodes"
for NODE in $BUILD_NODES jenkins.debian.net ; do
if [ "$NODE" = "jenkins.debian.net" ] ; then
diff --git a/mustache-templates/reproducible/main_navigation.mustache b/mustache-templates/reproducible/main_navigation.mustache
index dc063fd0..efe57ad6 100644
--- a/mustache-templates/reproducible/main_navigation.mustache
+++ b/mustache-templates/reproducible/main_navigation.mustache
@@ -173,5 +173,8 @@
Broken pieces
+
+ Build nodes health overview
+
{{{project_links_html}}}
--
cgit v1.2.3-70-g09d2