[Qa-jenkins-scm] [jenkins.debian.net] 02/03: reproducible: maintenance: wrap long list into a bash array

Mattia Rizzolo mattia at debian.org
Thu Apr 5 19:51:31 UTC 2018


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository jenkins.debian.net.

commit af5a2d4d8be8ea941c6fcfc9d1882fc2b4d18749
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Apr 5 21:40:01 2018 +0200

    reproducible: maintenance: wrap long list into a bash array
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 bin/reproducible_maintenance.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 3082708..91dc6aa 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -495,7 +495,16 @@ fi
 # daily mails
 if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ]  ; then
 	# once a day, send mail about builder problems
-	for PROBLEM in /var/log/jenkins/reproducible-stale-builds.log /var/log/jenkins/reproducible-race-conditions.log /var/log/jenkins/reproducible-diskspace-issues.log /var/log/jenkins/reproducible-remote-error.log /var/log/jenkins/reproducible-env-changes.log /var/log/jenkins/reproducible-submit2buildinfo.debian.net.log /var/log/postgresql/postgresql-9.6-main.log ; do
+	files_to_mail=(
+	/var/log/jenkins/reproducible-stale-builds.log
+	/var/log/jenkins/reproducible-race-conditions.log
+	/var/log/jenkins/reproducible-diskspace-issues.log
+	/var/log/jenkins/reproducible-remote-error.log
+	/var/log/jenkins/reproducible-env-changes.log
+	/var/log/jenkins/reproducible-submit2buildinfo.debian.net.log
+	/var/log/postgresql/postgresql-9.6-main.log
+	)
+	for PROBLEM in "${files_to_mail[@]}" ; do
 		if [ -s $PROBLEM ] ; then
 			TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX)
 			if [ "$(dirname $PROBLEM)" = "/var/log/jenkins" ] ; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list