[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: djm: first do actions, then (if) fetch reports

Holger Levsen (@holger) gitlab at salsa.debian.org
Tue May 23 23:57:31 BST 2023



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
c7f0721c by Holger Levsen at 2023-05-24T00:53:19+02:00
djm: first do actions, then (if) fetch reports

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
ce46c6e1 by Holger Levsen at 2023-05-24T00:57:12+02:00
jenkins nodes maintenance: issue warning if apt has updates to install

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


4 changed files:

- TODO
- bin/djm
- bin/reproducible_maintenance.sh
- logparse/reproducible.rules


Changes:

=====================================
TODO
=====================================
@@ -32,6 +32,7 @@ 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:
+** make sure there's only one djm run fetching...
 ** 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?


=====================================
bin/djm
=====================================
@@ -595,20 +595,6 @@ djm_do() {
 	echo Thank you for doing documented jenkins maintenance.
 }
 
-djm_init() {
-	DUMMY=$(mktemp)
-	touch -d "$(date -u -d "12 hours ago" '+%Y-%m-%d %H:%M') UTC" $DUMMY
-	if $FETCH || [ ! -f $JOBS ] || [ $DUMMY -nt $JOBS ] ; then
-		if ! $DRY_RUN ; then
-			echo "Fetching remote logs."
-			djm_fetch
-		fi
-	else
-		echo "Not fetching remote logs."
-	fi
-	rm $DUMMY
-}
-
 show_fixmes() {
 	local BASEDIR="$(dirname "$(readlink -e $0)")"
 	local TMPFILE=$(mktemp)
@@ -624,7 +610,18 @@ show_fixmes() {
 	seperator
 }
 
-djm_end() {
+djm_finish() {
+	DUMMY=$(mktemp)
+	touch -d "$(date -u -d "12 hours ago" '+%Y-%m-%d %H:%M') UTC" $DUMMY
+	if $FETCH || [ ! -f $JOBS ] || [ $DUMMY -nt $JOBS ] ; then
+		if ! $DRY_RUN ; then
+			echo "Fetching remote logs."
+			djm_fetch
+		fi
+	else
+		echo "Not fetching remote logs."
+	fi
+	rm $DUMMY
 	if $VERBOSE ; then
 		show_fixmes
 	fi
@@ -634,13 +631,11 @@ djm_end() {
 # main
 #
 case $MODE in
-	report)		djm_init
-			djm_report
-			djm_end
+	report)		djm_report
+			djm_finish
 			;;
-	djm)		djm_init
-			djm_do "$1" "$2" "$3" "$4"
-			djm_end
+	djm)		djm_do "$1" "$2" "$3" "$4"
+			djm_finish
 			;;
 	help)		show_help
 			;;


=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -892,6 +892,7 @@ fi
 #
 # checking for system updates
 #
+sudo apt-get update
 if [ $(apt list --upgradable 2>/dev/null | wc -l) -gt 1 ] ; then
 	echo "Warning: there are packages to be upgraded on this system."
 	apt list --upgradable 2>/dev/null


=====================================
logparse/reproducible.rules
=====================================
@@ -37,6 +37,7 @@ warning /Warning: .+ has wrong MTU, please tell the jenkins admins to fix this./
 warning /Warning: Problems analysing/
 warning /Warning: .+ .xiting cleanly as this is out-of-scope./
 warning /Warning: Cannot determine diffoscope version in Debian, aborting./
+warning /Warning: there are packages to be upgraded on this system./
 
 # If an artifact is created, show it as info
 info /- enjoy https:/



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/d6c4317dd22148bcfe4b3b9a3285bf366255d341...ce46c6e1538f1668be1c3af56f70bfd0264a5ceb

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/d6c4317dd22148bcfe4b3b9a3285bf366255d341...ce46c6e1538f1668be1c3af56f70bfd0264a5ceb
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/20230523/b2b96e7b/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list