diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-02 11:40:11 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-02 11:40:11 +0200 |
commit | 2cfab5ad8fdd5856738deed4f6569e2904e2cfee (patch) | |
tree | 73d9b842d8171f3f25b6a483df051689b73f3268 /bin/reproducible_maintenance.sh | |
parent | 662dc8631c26028715b91571a7a7ced2c4d18218 (diff) | |
download | jenkins.debian.net-2cfab5ad8fdd5856738deed4f6569e2904e2cfee.tar.xz |
reproducible: spool notifications to package maintainers and only send them once a day
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-x | bin/reproducible_maintenance.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 7cc50dd6..4518415d 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -336,8 +336,9 @@ if [ ! -z "$BADPERMS" ] ; then echo fi -# once a day, send mail about builder problems +# daily mails if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then + # once a day, send mail about builder problems 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) @@ -346,6 +347,16 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then rm -f $TMPFILE fi done + # once a day, send notifications to package maintainers + cd /srv/reproducible-results/notification-emails + for NOTE in $(find . -type f) ; do + TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX) + mv $NOTE $TMPFILE + cat $TMPFILE | mail -s "reproducible.debian.net status changes for $NOTE" \ + -a "From: Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>" \ + $NOTE@packages.debian.org + rm -f $TMPFILE + done fi if ! $DIRTY ; then |