[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible trbo system health check: refactor, renameing
Holger Levsen
gitlab at salsa.debian.org
Sun Jul 26 18:23:48 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
82f6632b by Holger Levsen at 2020-07-26T19:23:15+02:00
reproducible trbo system health check: refactor, renameing
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_system_health.sh
Changes:
=====================================
bin/reproducible_system_health.sh
=====================================
@@ -32,7 +32,7 @@ SUSPICIOUS=0
FAILED_JOBS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
UNSTABLE_JOBS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
IGNORED_JOBS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
-BAD_JOBS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
+KNOWN_BAD_JOBS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
FAILED_SUSPECTS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
UNSTABLE_SUSPECTS=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
LOG=$(mktemp --tmpdir=$TMPDIR trbo-status-XXXXXXX)
@@ -41,7 +41,7 @@ small_note() {
NOTE="<small>$1</small>"
}
-define_log(){
+prepare_log(){
if [ -f $JOB/builds/$LAST/log ] ; then
ln -sf $JOB/builds/$LAST/log $LOG
elif [ -f $JOB/builds/$LAST/log.gz ] ; then
@@ -61,7 +61,7 @@ for JOB in reproducible_* ; do
REMOTE=false
case $JOB in
reproducible_builder_fedora*|reproducible_archlinux_html_pages|reproducible_openwrt_rebuilder_future|reproducible_openwrt_rebuilder_today|reproducible_*alpine*)
- echo " <li><a href=\"https://jenkins.debian.net/job/$JOB/\">$JOB</a></li>" >> ${BAD_JOBS}
+ echo " <li><a href=\"https://jenkins.debian.net/job/$JOB/\">$JOB</a></li>" >> ${KNOWN_BAD_JOBS}
echo " ignored job: $JOB (known to be non-functional)"
let INVALID+=1
continue
@@ -129,7 +129,7 @@ for JOB in reproducible_* ; do
elif [ "$LAST" = "$UNSTABLE" ] ; then
echo "unstable job: $JOB"
let SCORE+=1 || SCORE=0
- define_log
+ prepare_log
# only show the most severe problem, don't aggregate them
if $(grep -q "failed Squid Web Proxy Server" $LOG) ; then
small_note " (squid.service failed)"
@@ -152,7 +152,7 @@ for JOB in reproducible_* ; do
echo " <li><a href=\"https://jenkins.debian.net/job/$JOB/\">$JOB</a>$NOTE</li>" >> ${UNSTABLE_SUSPECTS}
fi
else
- define_log
+ prepare_log
# only show the most severe problem, don't aggregate them
if $(grep -E -q "Failed to connect to [.0-9]+ port 3128: Connection refused" $LOG) ; then
small_note " (failed to connect to https-proxy)"
@@ -265,9 +265,9 @@ conditional_paragraph ${UNSTABLE_JOBS} "Unstable jobs" "$(cat ${UNSTABLE_JOBS})"
conditional_paragraph ${FAILED_SUSPECTS} "Failed jobs on nodes automatically marked down by jenkins" "$(cat ${FAILED_SUSPECTS} | sort -t '|' -n -r | cut -d '|' -f2- | sort)"
conditional_paragraph ${UNSTABLE_SUSPECTS} "Unstable jobs on nodes automatically marked down by jenkins" "$(cat ${UNSTABLE_SUSPECTS})"
conditional_paragraph ${IGNORED_JOBS} "Ignored jobs (because these nodes are known and <a href=\"https://salsa.debian.org/qa/jenkins.debian.net/-/blob/master/jenkins-home/offline_nodes\">documented</a> to be offline)" "$(cat ${IGNORED_JOBS})"
-conditional_paragraph ${BAD_JOBS} "Ignored jobs (because they are known to be non-funtional)" "$(cat ${BAD_JOBS})"
+conditional_paragraph ${KNOWN_BAD_JOBS} "Ignored jobs (because they are known to be non-funtional)" "$(cat ${KNOWN_BAD_JOBS})"
write2healthfile "<p><small>last updated: $(date -u) by the <a href=\"https://jenkins.debian.net/job/reproducible_system_health/\">reproducible_system_health</a> job on jenkins.debian.net.</small></p>"
write2healthfile "</body></html>"
echo "$(date -u) - $(basename $HEALTH_FILE).html updated, visible at $REPRODUCIBLE_URL/$(basename $HEALTH_FILE).html."
echo "$(date -u) - the end."
-rm -f ${FAILED_JOBS} ${UNSTABLE_JOBS} ${IGNORED_JOBS} ${BAD_JOBS} ${FAILED_SUSPECTS} ${UNSTABLE_SUSPECTS} $LOG
+rm -f ${FAILED_JOBS} ${UNSTABLE_JOBS} ${IGNORED_JOBS} ${KNOWN_BAD_JOBS} ${FAILED_SUSPECTS} ${UNSTABLE_SUSPECTS} $LOG
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/82f6632b6b35796601bcb705dfc796c60cb7d3f7
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/82f6632b6b35796601bcb705dfc796c60cb7d3f7
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/20200726/01468bea/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list