[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] djm: minor fixes

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Apr 10 19:14:54 BST 2023



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


Commits:
d97ccbda by Holger Levsen at 2023-04-10T20:14:45+02:00
djm: minor fixes

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

- - - - -


2 changed files:

- bin/djm-jenkins-parser
- bin/djm-logparser


Changes:

=====================================
bin/djm-jenkins-parser
=====================================
@@ -16,7 +16,7 @@ if [ -z "$DJM_USER" ] ; then
 	echo "Environment variable DJM_USER must be set. Exiting."
 	exit 1
 fi
-if [ !-d ~jenkins/jobs ] ; then
+if [ ! -d ~jenkins/jobs ] ; then
 	echo "~jenkins/jobs is not a directory, are you running this on the jenkins host?"
 	exit 1
 fi
@@ -54,9 +54,9 @@ for i in $LOGS $ZLOGS ; do
 	else
 		echo "$DIRNAME/log" >> $MYLOG
 		if [ "$(basename $i)" == "log" ] ; then
-			RESULT=$(head -1 $i | grep -E -i "Started by user.*$DJM_USER")
+			RESULT=$(head -1 $i | grep -E -i "Started by user.*$DJM_USER" || true)
 		else
-			RESULT=$(zcat $i | head -1 | grep -E -i "Started by user.*$DJM_USER")
+			RESULT=$(zcat $i | head -1 | grep -E -i "Started by user.*$DJM_USER" || true)
 		fi
 		if [ -n "$RESULT" ] ; then
 			: # echo $i


=====================================
bin/djm-logparser
=====================================
@@ -26,7 +26,7 @@ LOGMONTH="$(date -u '+%Y-%m')"
 # parse jenkins build logs and copy the result over
 #
 ssh $DJM_USER at jenkins.debian.net "DJM_USER=$DJM_USER /srv/jenkins/bin/djm-jenkins-parser"
-scp $DJM_USER at jenkins.debian.net:$UI_LOGFILE $UI_LOGFILE
+scp $DJM_USER at jenkins.debian.net:$(basename $UI_LOGFILE) $UI_LOGFILE
 
 #
 # little helpers



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/d97ccbdab568fefcd727eb9fe6954a15ea048b21
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/20230410/e9304d62/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list