[Git][qa/jenkins.debian.net][master] reproducible system health: include timestamps of failed job runs
Holger Levsen (@holger)
gitlab at salsa.debian.org
Thu Apr 18 21:06:22 BST 2024
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
00cca3c9 by Holger Levsen at 2024-04-18T22:06:08+02:00
reproducible system health: include timestamps of failed job runs
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_system_health.sh
Changes:
=====================================
bin/reproducible_system_health.sh
=====================================
@@ -43,13 +43,18 @@ small_note() {
}
prepare_log(){
+ local SOURCE=""
if [ -f $JOB_NAME/builds/$LAST/log ] ; then
- cp $JOB_NAME/builds/$LAST/log $LOG
+ SOURCE=$JOB_NAME/builds/$LAST/log
+ cp $SOURCE $LOG
elif [ -f $JOB_NAME/builds/$LAST/log.gz ] ; then
- zcat $JOB_NAME/builds/$LAST/log.gz > $LOG
+ SOURCE=$JOB_NAME/builds/$LAST/log.gz
+ zcat $SOURCE > $LOG
else
echo > $LOG
+ SOURCE=$LOG
fi
+ TIMESTAMP="$(stat -c '%y' $SOURCE | cut -d ':' -f1-2) UTC"
}
# gather data
@@ -122,6 +127,7 @@ for JOB_NAME in $(ls -1d reproducible_* | sort ) ; do
STABLE=$(grep lastStableBuild $FILE|awk '{print $2}')
UNSTABLE=$(grep lastUnstableBuild $FILE|awk '{print $2}')
NOTE=""
+ TIMESTAMP=""
if [ "$LAST" = "$STABLE" ] ; then
echo " stable job: $JOB_NAME"
let SCORE+=3 || SCORE=0
@@ -247,9 +253,9 @@ for JOB_NAME in $(ls -1d reproducible_* | sort ) ; do
small_note "packages with unmet dependencies"
fi
if ! $SUSPECT ; then
- echo "1|$JOB_NAME|$JOB_URL|true|$NOTE" >> ${UNSTABLE_JOBS}
+ echo "1|$JOB_NAME|$JOB_URL|true|$NOTE|$TIMESTAMP" >> ${UNSTABLE_JOBS}
else
- echo "1|$JOB_NAME|$JOB_URL||$NOTE" >> ${UNSTABLE_SUSPECTS}
+ echo "1|$JOB_NAME|$JOB_URL||$NOTE|$TIMESTAMP" >> ${UNSTABLE_SUSPECTS}
fi
else
prepare_log
@@ -388,9 +394,9 @@ for JOB_NAME in $(ls -1d reproducible_* | sort ) ; do
echo " failed job: $JOB_NAME - $MODIFIER"
fi
if ! $SUSPECT ; then
- echo "$MODIFIER|$JOB_NAME|$JOB_URL|true|$NOTE" >> ${FAILED_JOBS}
+ echo "$MODIFIER|$JOB_NAME|$JOB_URL|true|$NOTE|$TIMESTAMP" >> ${FAILED_JOBS}
else
- echo "$MODIFIER|$JOB_NAME|$JOB_URL||$NOTE" >> ${FAILED_SUSPECTS}
+ echo "$MODIFIER|$JOB_NAME|$JOB_URL||$NOTE|$TIMESTAMP" >> ${FAILED_SUSPECTS}
fi
fi
let SCORE-=$MODIFIER || SCORE=0
@@ -468,7 +474,7 @@ conditional_paragraph() {
IFS=$'\012'
for LINE in $(cat $1 | sort -t '|' -n ) ; do
# only the first three fields are mandatory:
- # MODIFIER | JOB_NAME | JOB_URL | BADGE (true or false) | NOTE
+ # MODIFIER | JOB_NAME | JOB_URL | BADGE (true or false) | NOTE | TIMESTAMP
local MODIFIER=$(echo $LINE | cut -d '|' -f1)
local NAME=$(echo $LINE | cut -d '|' -f2)
local URL=$(echo $LINE | cut -d '|' -f3)
@@ -496,15 +502,15 @@ conditional_paragraph() {
else
local BADGE=$(echo $LINE | cut -d '|' -f4)
local NOTE=$(echo $LINE | cut -d '|' -f5)
+ local TIMESTAMP=$(echo $LINE | cut -d '|' -f6)
if [ "$BADGE" = "true" ] ; then
local LINK="<img src=\"$URL/badge/icon\">$(sed_rb $NAME)"
else
local LINK="$(sed_rb $NAME)"
fi
- if [ "$MODIFIER" = "1" ] ; then
- local MOREINFO="$NOTE"
- else
- local MOREINFO="$NOTE <em>($MODIFIER)</em>"
+ local MOREINFO="$NOTE <small> at $TIMESTAMP</small>"
+ if [ "$MODIFIER" != "1" ] ; then
+ MOREINFO="$MOREINFO <em>($MODIFIER)</em>"
fi
AHREF="<a href=\"$URL/\">$LINK</a> $MOREINFO"
fi
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/00cca3c9386330c1ba1c4e42f85e1d7f764a6718
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/00cca3c9386330c1ba1c4e42f85e1d7f764a6718
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/20240418/24a6beb6/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list