summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-12-20 13:33:48 +0100
committerHolger Levsen <holger@layer-acht.org>2016-12-20 13:33:48 +0100
commit0eeb41a818ea41a18c7e5ae466a35118d7a0428d (patch)
treeb1d6c2d0cf0d0ffbb2e1e19448ca7a2c516e4ea1
parentd485e7d70aeed8f92f0d86d76e144d548982eab3 (diff)
downloadjenkins.debian.net-0eeb41a818ea41a18c7e5ae466a35118d7a0428d.tar.xz
reproducible Debian: also send mail about postgresql problems
-rwxr-xr-xbin/reproducible_maintenance.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 9d24fe5d..c3449474 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:"