Commit 5e3f7d34 authored by Holger Levsen's avatar Holger Levsen

reproducible Debian: save scheduler results in logfile and mail that once a...

reproducible Debian: save scheduler results in logfile and mail that once a day instead of mailing after each run (8 times a day or so)
Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent fcf5e476
...@@ -643,6 +643,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then ...@@ -643,6 +643,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then
/var/log/jenkins/reproducible-race-conditions.log /var/log/jenkins/reproducible-race-conditions.log
/var/log/jenkins/reproducible-diskspace-issues.log /var/log/jenkins/reproducible-diskspace-issues.log
/var/log/jenkins/reproducible-remote-error.log /var/log/jenkins/reproducible-remote-error.log
/var/log/jenkins/reproducible-scheduler.log
/var/log/jenkins/reproducible-env-changes.log /var/log/jenkins/reproducible-env-changes.log
/var/log/jenkins/reproducible-submit2buildinfo.debian.net.log /var/log/jenkins/reproducible-submit2buildinfo.debian.net.log
/var/log/postgresql/postgresql-9.6-main.log /var/log/postgresql/postgresql-9.6-main.log
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright © 2015-2018 Mattia Rizzolo <mattia@mapreri.org> # Copyright © 2015-2018 Mattia Rizzolo <mattia@mapreri.org>
# Copyright © 2015-2018 Holger Levsen <holger@layer-acht.org> # Copyright © 2015-2019 Holger Levsen <holger@layer-acht.org>
# Based on reproducible_scheduler.sh © 2014-2015 Holger Levsen <holger@layer-acht.org> # Based on reproducible_scheduler.sh © 2014-2015 Holger Levsen <holger@layer-acht.org>
# Licensed under GPL-2 # Licensed under GPL-2
# #
...@@ -777,14 +777,7 @@ if __name__ == '__main__': ...@@ -777,14 +777,7 @@ if __name__ == '__main__':
log.info('Arch %s scheduled at %s.', arch, datetime.now().strftime("%Y-%m-%d %H:%M:%S")) log.info('Arch %s scheduled at %s.', arch, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
if message != '': if message != '':
# build the kgb message text # build the kgb message text
message = 'Scheduled in ' + '+'.join(SUITES) + ':\n' + message message = 'Scheduled in ' + '+'.join(SUITES) + ' at ' + datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ':\n' + message + '\n'
log.info(message) log.info(message)
msg = MIMEText(message) with open('/var/log/jenkins/reproducible-scheduler.log', 'w') as logfile:
mail_from = 'jenkins@jenkins.debian.net' logfile.write(message)
mail_to = 'qa-jenkins-scm@lists.alioth.debian.org'
msg['From'] = mail_from
msg['To'] = mail_to
msg['Subject'] = 'packages scheduled for reproducible Debian'
s = smtplib.SMTP('localhost')
s.sendmail(mail_from, [mail_to], msg.as_string())
s.quit()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment