[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] djm: refactoring, and give rb-mail* another background color

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed May 17 01:34:05 BST 2023



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


Commits:
117db8ad by Holger Levsen at 2023-05-17T02:33:21+02:00
djm: refactoring, and give rb-mail* another background color

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

- - - - -


2 changed files:

- TODO
- bin/djm


Changes:

=====================================
TODO
=====================================
@@ -32,20 +32,25 @@ 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:
-** option: --today to be used with action shell
-** options: --press-enter --dont-wait-for-enter, default being wait for enter.
+** action: s|top-builds: prepare reboot on jenkins
+** --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.
 ** update documentation refering to deploy_jdn to djm
 *** 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
-** include hours with manual jobs triggered
 ** 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
 *** include notmuch mails, "received and read". write djm-notmuch-parser.
 *** include irc. (timeslices when one said something on relevant channels)
+*** new action to stop the build service on jenkins and all nodes
+*** new action to remove old kernels on old codethink/ubuntu nodes
+** remove "so expect changes for some time." line
+** remove/reword "Still very simple statistics"
 
 === nodes at OSUOSL
 


=====================================
bin/djm
=====================================
@@ -139,17 +139,17 @@ show_help(){
 	echo "         	or special target '.' for jenkins-ui ACTION."
 	echo
 	echo "ACTION=   one of these:"
-	echo "         _a_utoremove             apt autoremove && apt clean"
-	echo "         _b_ring-back             mark hosts as online"
-	echo "         _c_ommand                run \$4 on hosts"
-	echo "         _d_eploy-git             deploy jenkins.debian.net.git"
-	echo "         _f_fix-future            fix clock on hosts running in the future"
-	echo "         _j_enkins-ui             for when doing things manually in the jenkins-ui"
-	echo "         _p_owercycle"
-	echo "         _r_eboot"
-	echo "         _rm_stamp                remove stamp files (from pbuilder and update_jdn.sh)"
-	echo "         _s_shell                 for manual maintenance"
-	echo "         _u_pgrade                apt update && apt -y dist-upgrade"
+	echo "         a|autoremove            apt autoremove && apt clean"
+	echo "         b|bring-back            mark hosts as online"
+	echo "         c|command               run \$4 on hosts"
+	echo "         d|deploy-git            deploy jenkins.debian.net.git"
+	echo "         f|fix-future            fix clock on hosts running in the future"
+	echo "         j|jenkins-ui            for when doing things manually in the jenkins-ui"
+	echo "         p|powercycle"
+	echo "         r|reboot"
+	echo "         rm|rmstamp              remove stamp files (from pbuilder and update|jdn.sh)"
+	echo "         s|shell                 for manual maintenance"
+	echo "         u|upgrade               apt update && apt -y dist-upgrade"
 	echo
 	echo "REASON=   one of these:"
 	echo "          cs=clock skew"
@@ -372,6 +372,7 @@ get_arch_color() {
 		*arm64*)		BG=orange ;;
 		*armhf*)		BG=lightyellow ;;
 		*jenkins.debian.*)	BG=yellow ;;
+		rb-mail*)		BG=pink ;;
 		*)			BG=white ;;
 	esac
 }
@@ -406,7 +407,7 @@ EOF
 	xterm -T "$SHORTNODE / $ACTION ($FILE)" -class deploy-jenkins -bg $BG -fa 'DejaVuSansMono' -fs 10 -e "bash $FILE" &
 }
 
-run_command_futureproof_on_host_in_xterm() {
+run_command_futureproof_on_node_in_xterm() {
 	COMMAND="( $COMMAND ) || ( echo press enter ; read a )"
 	if node_in_the_future "$SHORTNODE" ; then
 		COMMAND="sudo ntpdate -b $NTP_SERVER ; $COMMAND"
@@ -544,10 +545,10 @@ djm_do() {
 
 					;;
 			autoremove)	COMMAND="sudo apt-get autoremove"
-					run_command_futureproof_on_host_in_xterm
+					run_command_futureproof_on_node_in_xterm
 					;;
 			apt-upgrade)	COMMAND="sudo apt-get update && sudo apt-get -y dist-upgrade && sudo apt-get clean"
-					run_command_futureproof_on_host_in_xterm
+					run_command_futureproof_on_node_in_xterm
 					;;
 			deploy-git)	GIT_REPO="https://salsa.debian.org/qa/jenkins.debian.net.git"
 					unset GITOPTS
@@ -571,14 +572,14 @@ djm_do() {
 						fi
 						./update_jdn.sh 2>&1 | sudo tee -a /var/log/jenkins/update_jdn.log
 					EOF
-					run_command_futureproof_on_host_in_xterm
+					run_command_futureproof_on_node_in_xterm
 					;;
 			rmstamp)	COMMAND="sudo rm -f /var/log/jenkins/*stamp"
 					xterm -T "$SHORTNODE / $ACTION" -class deploy-jenkins -bg $BG -fa 'DejaVuSansMono' -fs 10 -e "ssh -t $NODE \"$COMMAND\"" &
 					;;
 			command)	COMMAND="$4"
 					COMMAND="$COMMAND ; ( echo press enter ; read a )"
-					run_command_futureproof_on_host_in_xterm
+					run_command_futureproof_on_node_in_xterm
 					;;
 			*)	echo unsupported action, sorry, please improve.
 				exit 1



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/117db8adc220c31e98ffe57ed52cfac38634bf23

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/117db8adc220c31e98ffe57ed52cfac38634bf23
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/48a0a1ea/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list