[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] jdm-jenkins-parser: deal with find sometimes resulting in exitcode 1
Holger Levsen (@holger)
gitlab at salsa.debian.org
Wed May 17 18:04:52 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
d6c4317d by Holger Levsen at 2023-05-17T19:04:28+02:00
jdm-jenkins-parser: deal with find sometimes resulting in exitcode 1
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- TODO
- bin/djm-jenkins-parser
Changes:
=====================================
TODO
=====================================
@@ -32,7 +32,10 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
** maybe: rm /tmp/mmdebstrap.* older than 3 days
* split TODO in TODO and TODO.legacy?
* djm:
-** action: s|top-builds: prepare reboot on jenkins
+** action: s|top-builds: prepare reboot on jenkins: 1st stop build service, 2nd stop builds on all nodes
+** automatically backup+cleanup logs on the first of the month
+*** write it now, to move April data to 04 files, and either make this run on May 23 or just any day?
+** new feature: --show-month 04
** --report: include hours with manual jobs triggered
** option: --today to be used with action shell (and maybe others)
** option: --dont-wait4-enter, default being wait for enter.
@@ -40,8 +43,6 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
*** ups, there's no doc on deploy_jdn anyway
** also log an id, so that one command effecting several hosts is counted as on action
*** make actions triggering 'all' be only one entry in the djm logfile -> more sensible stats
-** automatically backup+cleanup logs on the first of the month
-** new feature: --show-month 04
** maybe:
*** document running "mosh jenkins shell-monitor" processes?
*** document jenkins plugin updates -> manually or though my local script which calls the webpages could log this more easily
=====================================
bin/djm-jenkins-parser
=====================================
@@ -8,7 +8,7 @@
# released under the GPLv2
#
-set -ex
+set -e
set -o pipefail # see eg http://petereisentraut.blogspot.com/2010/11/pipefail.html
# check environment
@@ -32,16 +32,16 @@ MYRESULTS=~/.djm-jenkins-ui.log
# find recent / unparsed logfiles
if [ ! -f $MYLOG ] ; then
- LOGS=$(find ./reproducible_*/builds/*/log 2>/dev/null)
- ZLOGS=$(find ./reproducible_*/builds/*/log.gz 2>/dev/null)
+ LOGS=$(find ./reproducible_*/builds/*/log 2>/dev/null || true)
+ ZLOGS=$(find ./reproducible_*/builds/*/log.gz 2>/dev/null || true)
echo "Note: initial run detected, this will take a few minutes."
touch $MYLOG
else
if [ $(cat $MYLOG | wc -l) -gt 150000 ] ; then
echo "Note: $MYLOG has become very big, maybe time to backup $MYLOG and $MYRESULTS?"
fi
- LOGS=$(find ./reproducible_*/builds/*/log -newer $MYLOG 2>/dev/null)
- ZLOGS=$(find ./reproducible_*/builds/*/log.gz -newer $MYLOG 2>/dev/null)
+ LOGS=$(find ./reproducible_*/builds/*/log -newer $MYLOG 2>/dev/null || true)
+ ZLOGS=$(find ./reproducible_*/builds/*/log.gz -newer $MYLOG 2>/dev/null || true)
fi
echo "Parsing $(echo $LOGS $ZLOGS | sed 's# #\n#g' | wc -l) logfiles now."
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/d6c4317dd22148bcfe4b3b9a3285bf366255d341
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/d6c4317dd22148bcfe4b3b9a3285bf366255d341
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/20230517/46cc5d82/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list