[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] refactor: run code to show FIXMEs locally

Holger Levsen gitlab at salsa.debian.org
Sat Jan 18 11:54:15 GMT 2020



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


Commits:
cdad9995 by Holger Levsen at 2020-01-18T12:53:46+01:00
refactor: run code to show FIXMEs locally

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

- - - - -


2 changed files:

- deploy_jdn
- update_jdn.sh


Changes:

=====================================
deploy_jdn
=====================================
@@ -48,10 +48,31 @@ node_in_the_future () {
 	esac
 }
 
+show_fixmes() {
+	#
+	# There's always some work left...
+	#	echo FIXME is ignored so check-jobs scripts can output templates requiring manual work
+	#
+	BASEDIR="$(dirname "$(readlink -e $0)")"
+	TMPFILE=$(mktemp)
+	rgrep FI[X]ME $BASEDIR/* | grep -v $BASEDIR/TODO | grep -v echo > $TMPFILE || true
+	if [ -s $TMPFILE ] ; then
+		echo
+		echo Existing FIXME statements:
+		echo
+		cat $TMPFILE
+		echo
+	fi
+	rm -f $TMPFILE
+}
+
 echo
 echo -n "$(date) - "
 reset_clock=true
-if [ "$1" = "all" ] ; then
+if [ "$1" = "fixme" ] ; then
+	show_fixmes
+	exit 0
+elif [ "$1" = "all" ] ; then
 	echo -n "Running j.d.n.git updates on ${HOSTS[@]} now"
 	# reset_clock can be false as update_jdn.sh sets the time
 	reset_clock=false
@@ -244,6 +265,7 @@ if [ ! -z "$OFFLINE" ] ; then
 	echo -e "$OFFLINE"
 	echo
 fi
+show_fixmes
 END=$(date +'%s')
 DURATION=$(( $END - $START ))
 HOUR=$(echo "$DURATION/3600"|bc)


=====================================
update_jdn.sh
=====================================
@@ -783,21 +783,6 @@ EOF
 	fi
 fi
 
-#
-# There's always some work left...
-#	echo FIXME is ignored so check-jobs scripts can output templates requiring manual work
-#
-if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
-	TMPFILE=$(mktemp)
-	rgrep FI[X]ME $BASEDIR/* | grep -v $BASEDIR/TODO | grep -v echo > $TMPFILE || true
-	if [ -s $TMPFILE ] ; then
-		echo
-		cat $TMPFILE
-		echo
-	fi
-	rm -f $TMPFILE
-fi
-
 #
 # almost finally…
 #



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/cdad99954c837c9f5281adaebc302217eaea04b4

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/cdad99954c837c9f5281adaebc302217eaea04b4
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/20200118/4d3b0e25/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list