[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible fdroid: only trigger jobs by commits, not by timer

Holger Levsen gitlab at salsa.debian.org
Mon Aug 24 14:07:27 BST 2020



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


Commits:
e0e85320 by Holger Levsen at 2020-08-24T15:06:54+02:00
reproducible fdroid: only trigger jobs by commits, not by timer

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

- - - - -
22a6ae1e by Holger Levsen at 2020-08-24T15:07:12+02:00
reproducible trbo monitor: add more information

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

- - - - -


2 changed files:

- bin/jenkins-shell-monitor.sh
- job-cfg/reproducible.yaml


Changes:

=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -8,37 +8,67 @@
 # to be run manually on jenkins in a terminal
 #
 
+# initialize internal variables
 SEQ1=$(seq 1 10)
 SEQ2=$(seq 1 60)
+PSFAX=$(mktemp --tmpdir=$TMPDIR jenkins-shell-monitor-XXXXXXX)
+
+# prepare cleaning up
+cleanup_all() {
+	trap - INT TERM EXIT
+	rm -vf $PSFAX
+	echo "Terminated, good-bye."
+	exit 0
+}
 
 #
 # main
 #
 main_loop() {
-	# data updated every....
+	# most data is updated every ten minutes
+	ps fax > $PSFAX
+	LSOF=$(lsof -n | wc -l)
 	SCHROOT_SESSIONS=$(find /var/lib/schroot/session/ | wc -l)
 	SCHROOT_MOUNTS=$(mount | grep /run/schroot| wc -l)
-	REPRO_WORKERS=$(ps fax | grep _worker.sh | grep -v grep | wc -l)
+	REPRO_JOBS=$(ls ~jenkins/jobs/reproducible_* -1d | wc -l)
+	JOBS_RUNNING_TOTAL=$(grep '_ /bin/bash /srv/jenkins/bin/' $PSFAX | egrep -v 'reproducible_worker.sh|reproducible_build.sh|jenkins-shell-monitor.sh' | wc -l)
+	JOBS_RUNNING_LOCAL=$(grep '_ /bin/bash /srv/jenkins/bin/' $PSFAX | egrep -v 'reproducible_worker.sh|reproducible_build.sh|jenkins-shell-monitor.sh|jenkins_master_wrapper.sh' | wc -l)
+	JOBS_RUNNING_REMOTE=$(grep jenkins_master_wrapper.sh $PSFAX | wc -l)
+	REPRO_WORKERS=$(grep reproducible_worker.sh $PSFAX | wc -l)
+	JENKINS_AGENTS=$(grep jenkins/agent.jar $PSFAX | wc -l)
 	for i in $SEQ1 ; do
-		reset
-		echo "     $(uptime)"
+		clear
+		echo "=== jenkins/trbo shell monitor ==="
 		echo
 		echo "relevant lines from ~jenkins/offline_nodes:"
 		grep -A 2342 Also ~jenkins/offline_nodes
 		echo
+		echo "##########################################################################"
+		echo
 		figlet $(cat ~/userContent/reproducible/trbo.status) 
 		echo " ^^^ trbo status"
 		echo
-		echo "uptime:               $(uptime)"
-		echo "schroot sessions:     $SCHROOT_SESSIONS"
-		echo "schroot mounts:       $SCHROOT_MOUNTS"
-		echo "debian repro workers: $REPRO_WORKERS"
+		echo "uptime:                          $(uptime | cut -d ',' -f1 | cut -d ' ' -f4-)"
+		echo "load average:                   $(uptime | cut -d ',' -f3 | cut -d ':' -f2)"
+		echo "logged in user sessions:         $(uptime | cut -d ',' -f2 | sed "s#users##" | xargs echo)"
+		echo "logged in users:                 $(w -h | awk '{print $1}' | sort -u | xargs echo)"
+		echo "number of open files:            $LSOF"
+		echo "schroot sessions:                $SCHROOT_SESSIONS"
+		echo "schroot mounts:                  $SCHROOT_MOUNTS"
+		echo "configured r-b jobs:             $REPRO_JOBS"
+		echo "running jenkins job (total):     $JOBS_RUNNING_TOTAL"
+		echo "running jenkins job (local):     $JOBS_RUNNING_LOCAL"
+		echo "running jenkins job (remote):    $JOBS_RUNNING_REMOTE"
+		echo "running debian r-b workers:      $REPRO_WORKERS"
+		echo "running jenkings agents/nodes:   $JENKINS_AGENTS"
+		echo "offline nodes:                   $(grep -v ^# ~jenkins/offline_nodes | grep -c debian)"
+		echo "offline nodes, marked in git:    $(grep -v ^# ~jenkins-adm/jenkins.debian.net/jenkins-home/offline_nodes | grep -c debian)"
 		echo
 		df -h  /dev/vda1 /var/lib/jenkins/userContent/reproducible /srv/workspace /tmp | awk '{printf "%-42s %-6s %-6s %s\n", $6, $2, $4, $5}'
 		echo
 		free -h | cut -b1-47
 		echo
-		echo "$(date -u)"
+		echo -n "$(date -u) "
 		for j in $SEQ2 ; do
 			echo -n "."
 			sleep 1
@@ -46,7 +76,8 @@ main_loop() {
 	done
 }
 
-
+# internal main
+trap cleanup_all INT TERM EXIT
 while true ; do
 	main_loop
 done


=====================================
job-cfg/reproducible.yaml
=====================================
@@ -826,7 +826,7 @@
             otherproject_blocked:
                 - 'setup_fdroid_build_environment':
                     my_description: 'Setup a build environment for F-Droid.'
-                    my_timed: '42 0 * * 1,3,5'
+                    my_timed: ''
                     my_hname: 'osuosl168'
                     my_recipients: 'jenkins+reproducible-builds qa-jenkins-scm at lists.alioth.debian.org hans at guardianproject.info michael.poehn at fsfe.org bubu at bubu1.eu'
                     my_blocker: '^reproducible.*fdroid.*'
@@ -836,10 +836,10 @@
             otherproject_git_blocked:
                 - 'fdroid_build_apps':
                     my_description: 'Build all the latest apps for F-Droid.'
-                    my_timed: '42 7 * * *'
+                    my_timed: ''
                 - 'fdroid_test':
                     my_description: 'Run tests on all the built APKs for F-Droid.'
-                    my_timed: '42 23 1 1 *'
+                    my_timed: ''
             my_hname: 'osuosl168'
             my_recipients: 'jenkins+reproducible-builds qa-jenkins-scm at lists.alioth.debian.org hans at guardianproject.info michael.poehn at fsfe.org bubu at bubu1.eu'
             my_blocker: '^reproducible_fdroid.*'



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/d6221a6afdbd1e672b2afdee5abe44c1c29e7055...22a6ae1e5d5b1e2730498f811db9a154d5577f76

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/d6221a6afdbd1e672b2afdee5abe44c1c29e7055...22a6ae1e5d5b1e2730498f811db9a154d5577f76
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/20200824/fdaf9f42/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list