[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible Debian: only include yesterdays problems when mailing postgres.log

Holger Levsen holger at layer-acht.org
Tue Jan 10 13:49:50 UTC 2017


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 defe08d705776a51cadadb1aea6d88a04a91aa6e
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Jan 10 14:49:40 2017 +0100

    reproducible Debian: only include yesterdays problems when mailing postgres.log
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_maintenance.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 8cfdaba..c6e7c63 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -420,8 +420,9 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ]  ; 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
+				# regular logfile, logrotate is used (and the file ain't owned by jenkins)
+				# only care for yesterday's entries:
+				grep $(date -u -d "1 day ago" '+%Y-%m-%d') $PROBLEM > $TMPFILE || echo "no problems yesterday…" > $TMPFILE
 			fi
 			( if [ "$(basename $PROBLEM)" = "reproducible-diskspace-issues.log" ]; then
 				echo "diskspace issues should always be investigated."

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