[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: add build nodes health overview page

Holger Levsen holger at layer-acht.org
Mon Jun 12 14:43:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit c90ae53e69340bcf33345a9f6bbc1d677012bca2
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Jun 12 16:43:01 2017 +0200

    reproducible Debian: add build nodes health overview page
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 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 e7fede8..9b4eaf0 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 2bb686c..0f79759 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 "<p>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…</p>"
+# FIXME: Also either $0 and its job needs to be renamed to include 'html' or the code needs to be moved elsewhere
+write_page "<p style=\"clear:both;\">"
+for ARCH in ${ARCHS} ; do
+	write_page "<h3>$ARCH nodes</h3>"
+	write_page "<table>"
+	write_page "<tr><th>Name</th><th>maintenance</th>"
+		for SUITE in ${SUITES} ; do
+			if [ "$SUITE" = "experimental" ] ; then
+				continue
+			fi
+			write_page "<th>schroot setup $SUITE</th>"
+		done
+		for SUITE in ${SUITES} ; do
+			write_page "<th>pbuilder setup $SUITE</th>"
+		done
+	write_page "</tr>"
+	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 "<tr><td>$JENKINS_NODENAME</td>"
+		URL="https://jenkins.debian.net/view/reproducible/view/Node_maintenance/job/reproducible_maintenance_${ARCH}_${JENKINS_NODENAME}"
+		BADGE="$URL/badge/icon"
+		write_page "<td><a href='$URL'><img src='$BADGE' /></a></td>"
+		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 "<td><a href='$URL'><img src='$BADGE' /></a></td>"
+		done
+		for SUITE in ${SUITES} ; do
+			if [ "$JENKINS_NODENAME" = "jenkins" ] ; then
+				write_page "<td colspan='3'></td>"
+			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 "<td><a href='$URL'><img src='$BADGE' /></a></td>"
+			fi
+		done
+		write_page "</tr>"
+		write_page "<tr><td></td>"
+		for GRAPH in jenkins_reproducible_builds cpu memory df ; do
+			if [ "$JENKINS_NODENAME" = "jenkins" ] && [ "$GRAPH" = "jenkins_reproducible_builds" ] ; then
+				write_page "<td></td>"
+			else
+				write_page "<td><a href='https://jenkins.debian.net/munin/debian.net/$NODE/$GRAPH.html'>"
+				write_page "<img src='https://jenkins.debian.net/munin/debian.net/$NODE/$GRAPH-day.png' width='150' /></a></td>"
+			fi
+		done
+		write_page "<td colspan='2'></td>"
+		write_page "</tr>"
+		
+	done
+	write_page "</table>"
+done
+write_page "</p>"
+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 dc063fd..efe57ad 100644
--- a/mustache-templates/reproducible/main_navigation.mustache
+++ b/mustache-templates/reproducible/main_navigation.mustache
@@ -173,5 +173,8 @@
   <li {{#breakages}}class='active'{{/breakages}}>
     <a href="/debian/index_breakages.html">Broken pieces</a>
   </li>
+  <li {{#breakages}}class='active'{{/nodes_health}}>
+    <a href="/debian/index_nodes_health.html">Build nodes health overview</a>
+  </li>
 </ul>
 {{{project_links_html}}}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list