From fce81b15443a9387e85649229850e8a0916b4d5a Mon Sep 17 00:00:00 2001
From: Holger Levsen
Date: Mon, 12 Jun 2017 20:28:01 +0200
Subject: reproducible Debian: have two nodes health graph pages: daily and
weekly
Signed-off-by: Holger Levsen
---
bin/reproducible_nodes_info.sh | 91 +++++++++++++++++++++++-------------------
1 file changed, 49 insertions(+), 42 deletions(-)
(limited to 'bin/reproducible_nodes_info.sh')
diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh
index 1878a8d8..133319a0 100755
--- a/bin/reproducible_nodes_info.sh
+++ b/bin/reproducible_nodes_info.sh
@@ -97,53 +97,60 @@ write_page "
"
write_page_footer
publish_page debian
-VIEW=nodes_graphs
-PAGE=index_${VIEW}.html
-ARCH=amd64
-SUITE=unstable
-echo "$(date -u) - starting to write $PAGE page."
-write_page_header $VIEW "Build nodes health graphs"
-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 | | "
- 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 | "
- for GRAPH in jenkins_reproducible_builds cpu memory df swap load ; do
- if [ "$JENKINS_NODENAME" = "jenkins" ] && [ "$GRAPH" = "jenkins_reproducible_builds" ] ; then
- write_page " | "
+for TYPE in daily weekly ; do
+ VIEW=nodes_${TYPE}_graphs
+ PAGE=index_${VIEW}.html
+ ARCH=amd64
+ SUITE=unstable
+ echo "$(date -u) - starting to write $PAGE page."
+ write_page_header $VIEW "Build nodes $TYPE graphs"
+ 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 | | "
+ 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
- write_page ""
- write_page " | "
+ 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 | "
+ for GRAPH in jenkins_reproducible_builds cpu memory df swap load ; do
+ if [ "$JENKINS_NODENAME" = "jenkins" ] && [ "$GRAPH" = "jenkins_reproducible_builds" ] ; then
+ write_page " | "
+ else
+ write_page ""
+ if [ "$TYPE" = "daily" ] ; then
+ IMG=day.png
+ else
+ IMG=week.png
+ fi
+ write_page " | "
+ fi
+ done
+ write_page "
"
+
done
- write_page ""
-
+ write_page "
"
done
- write_page "
"
+ write_page ""
+ write_page_footer
+ publish_page debian
done
-write_page ""
-write_page_footer
-publish_page debian
#
# collect node information
--
cgit v1.2.3-70-g09d2