[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian: save scheduler results in logfile and mail that once a...

Holger Levsen gitlab at salsa.debian.org
Thu May 2 15:02:58 BST 2019



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
5e3f7d34 by Holger Levsen at 2019-05-02T14:02:46Z
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 <holger at layer-acht.org>

- - - - -


2 changed files:

- bin/reproducible_maintenance.sh
- bin/reproducible_scheduler.py


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -643,6 +643,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ]  ; then
 		/var/log/jenkins/reproducible-race-conditions.log
 		/var/log/jenkins/reproducible-diskspace-issues.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-submit2buildinfo.debian.net.log
 		/var/log/postgresql/postgresql-9.6-main.log


=====================================
bin/reproducible_scheduler.py
=====================================
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #
 # Copyright © 2015-2018 Mattia Rizzolo <mattia at mapreri.org>
-# Copyright © 2015-2018 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2015-2019 Holger Levsen <holger at layer-acht.org>
 # Based on reproducible_scheduler.sh © 2014-2015 Holger Levsen <holger at layer-acht.org>
 # Licensed under GPL-2
 #
@@ -777,14 +777,7 @@ if __name__ == '__main__':
         log.info('Arch %s scheduled at %s.', arch, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
     if message != '':
         # 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)
-        msg = MIMEText(message)
-        mail_from = 'jenkins at jenkins.debian.net'
-        mail_to = 'qa-jenkins-scm at 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()
+        with open('/var/log/jenkins/reproducible-scheduler.log', 'w') as logfile:
+            logfile.write(message)



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/5e3f7d34138466b7324cbddb609ad65535391c50

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/5e3f7d34138466b7324cbddb609ad65535391c50
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190502/ee5804de/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list