From f521b26f9c308ca6c1baa4ee0589d78870717457 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 21 Sep 2015 14:17:10 +0200 Subject: reproducible: remove stale builds from at the beginning of the build and send a daily mail about these from the maintenance job --- bin/reproducible_maintenance.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin/reproducible_maintenance.sh') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index c577a659..0fd38938 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -336,6 +336,16 @@ if [ ! -z "$BADPERMS" ] ; then echo fi +# once a day, send mail about stale builds +if [ "$HOSTNAME" = "jenkins" ] && [ $(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 +fi + if ! $DIRTY ; then echo "$(date -u ) - Everything seems to be fine." echo -- cgit v1.2.3-54-g00ecf