From 716cb811c4805f0c60f07a8ae1b3538746c006af Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 26 Sep 2015 13:49:40 +0200 Subject: reproducible: also send mails about race conditions found --- bin/reproducible_maintenance.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index c4ec831f..7cc50dd6 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -336,14 +336,16 @@ if [ ! -z "$BADPERMS" ] ; then echo fi -# once a day, send mail about stale builds +# once a day, send mail about builder problems if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then - if [ -s /var/lib/jenkins/stale_builds.txt ] ; then - TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX) - mv /var/lib/jenkins/stale_builds.txt $TMPFILE - cat $TMPFILE | mail -s "stale builds found" qa-jenkins-scm@lists.alioth.debian.org - rm -f $TMPFILE - fi + for PROBLEM in /var/lib/jenkins/stale_builds.txt /var/log/jenkins/reproducible-race-conditions.log ; do + if [ -s $PROBLEM ] ; then + TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX) + mv $PROBLEM $TMPFILE + cat $TMPFILE | mail -s "$(basename $PROBLEM) found" qa-jenkins-scm@lists.alioth.debian.org + rm -f $TMPFILE + fi + done fi if ! $DIRTY ; then -- cgit v1.2.3-70-g09d2