diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-09-21 14:17:10 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-09-21 14:17:10 +0200 |
commit | f521b26f9c308ca6c1baa4ee0589d78870717457 (patch) | |
tree | 50e4e88a40207b0db988025019be57aa1c2574fb /bin/reproducible_maintenance.sh | |
parent | db68a8c9089e85182dd01aaf3b469d68c69b2aa2 (diff) | |
download | jenkins.debian.net-f521b26f9c308ca6c1baa4ee0589d78870717457.tar.xz |
reproducible: remove stale builds from at the beginning of the build and send a daily mail about these from the maintenance job
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-x | bin/reproducible_maintenance.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |