[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] jenkins: new script to watch jobs finishing (useful when jenkins is in shutdown mode)
Holger Levsen
gitlab at salsa.debian.org
Mon Nov 30 19:15:34 GMT 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
20e38fc0 by Holger Levsen at 2020-11-30T19:59:28+01:00
jenkins: new script to watch jobs finishing (useful when jenkins is in shutdown mode)
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- + bin/jenkins-shell-shutdown-monitor.sh
Changes:
=====================================
bin/jenkins-shell-shutdown-monitor.sh
=====================================
@@ -0,0 +1,29 @@
+#!/bin/bash
+# vim: set noexpandtab:
+
+# Copyright © 2020 Holger Levsen (holger at layer-acht.org)
+# released under the GPLv2
+#
+#
+# to be run manually on jenkins in a terminal
+#
+# useful to watch all remaining running jobs when bringing jenkins into
+# shutdown mode and waiting for the jobs to finish.
+# (so one can watch in shell instead of a webbrowser which uses a lot
+# less cpu...)
+
+TIMESPAN=23
+
+echo
+echo "$0 is only really useful to run when jenkins (the app) is in shutdown-mode."
+echo
+echo "Now showing all logfiles with activity in the last $TIMESPAN minutes. Please hang on, we will be ready in a moment..."
+echo
+sleep 1
+
+cd ~jenkins
+MMINOPTS="-mmin 0"
+for i in $(seq 1 $TIMESPAN) ; do
+ MMINOPTS="$MMINOPTS -o -mmin $i"
+done
+find jobs/*/builds/*/ -name log $MMINOPTS 2>/dev/null | xargs -r tail -f
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/20e38fc0f1c58f70b17561cf1c01f0cc70a87c24
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/20e38fc0f1c58f70b17561cf1c01f0cc70a87c24
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/20201130/1f139fb1/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list