[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: also send mail about postgresql problems

Holger Levsen holger at layer-acht.org
Tue Dec 20 12:34:48 UTC 2016


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

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

commit 0eeb41a818ea41a18c7e5ae466a35118d7a0428d
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Dec 20 13:33:48 2016 +0100

    reproducible Debian: also send mail about postgresql problems
---
 bin/reproducible_maintenance.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 9d24fe5..c344947 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -405,10 +405,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 ; do
+	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/postgresql/postgresql-9.4-main.log ; do
 		if [ -s $PROBLEM ] ; then
 			TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX)
-			mv $PROBLEM $TMPFILE
+			if [ "$(dirname $PROBLEM)" = "/var/log/jenkins" ] ; then
+				# maybe we should use logrotate for our jenkins logs too…
+				mv $PROBLEM $TMPFILE
+			else
+				# regular logfile, logrotate is used (and the file aint owned by jenkins)
+				cp $PROBLEM $TMPFILE
+			fi
 			( echo "A few entries per day are normal, a few dozens or hundreds probably not."
 			  if grep -q https $TMPFILE ; then
 				  echo "$(grep -c https $TMPFILE) entries found:"

-- 
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