From: Aaron Chan <aaron.chun.yew.c...@intel.com>

---
 config.py   | 34 ++++++++++++++++++++++++++++++++++
 services.py | 32 ++++++++++++++++++++++++++++----
 2 files changed, 62 insertions(+), 4 deletions(-)

diff --git a/config.py b/config.py
index 2568768..9d0807f 100644
--- a/config.py
+++ b/config.py
@@ -80,3 +80,37 @@ builder_to_workers = {
     "nightly-deb-non-deb": [],
     "default": workers
 }
+
+# MailNotifier default settings (refer to schedulers.py)
+#smtpConf = {
+#    "fromaddr"         : "yocto-bui...@yoctoproject.org",
+#    "sendToInterestedUsers": False,
+#    "extraRecipients"  : ["yocto-bui...@yoctoproject.org"],
+#    "subject"          : "",
+#    "mode"             : ["failing", "exception", "cancelled"],
+#    "builders"         : None,
+#    "tags"             : None,
+#    "schedulers"       : None,
+#    "branches"         : None,
+#    "addLogs"          : False, 
+#    "addPatch"         : True,
+#    "buildSetSummary"  : True,
+#    "smtpServer"       : "<SMTP server", 
+#    "smtpPort"         : "<SMTP Port>",
+#    "useTls"           : False, 
+#    "useSmtps"         : False,
+#    "smtpUser"         : None, 
+#    "smtpPassword"     : None,
+#    "lookup"           : None,
+#    "extraHeaders"     : None,
+#    "watchedWorkers"   : None,
+#    "missingWorkers"   : None,
+#    "template_dir"     : "<Email template path",
+#    "template_filename": "<Email template filename",
+#    "template"         : None,
+#    "template_type"    : "html",
+#    "subject_filename" : None,
+#    "subject"          : None,
+#    "wantProperties"   : True, 
+#    "wantSteps"        : True, 
+#}
diff --git a/services.py b/services.py
index 96d23ac..440845a 100644
--- a/services.py
+++ b/services.py
@@ -8,10 +8,34 @@ services = []
 # TODO: we'll replace this with functionality in yocto-autobuilder-helpers
 # to mail the error reports to the list
 # services.append(
-#     reporters.MailNotifier(fromaddr="yocto-bui...@yoctoproject.org",
-#                            sendToInterestedUsers=False,
-#                            extraRecipients=["yocto-bui...@yoctoproject.org"],
-#                            mode=('failing',))
+#     reporters.MailNotifier(fromaddr=config.smtpConf['fromaddr'],
+#                            
sendToInterestedUsers=config.smtpConf['sendToInterestedUsers'],
+#                            
extraRecipients=config.smtpConf['extraRecipients'],
+#                            mode=config.SmtpConf['mode'],
+#                            builders=config.smtpConf['builders'],
+#                            tags=config.smtpConf['tags'],
+#                            schedulers=config.smtpConf['schedulers'],
+#                            branches=config.smtpConf['branches'],
+#                            addLogs=config.smtpConf['addLogs'],
+#                            addPatch=config.smtpConf['addPatch'],
+#                            
buildSetSummary=config.smtpConf['buildSetSummary'],
+#                            relayhost=config.smtpConf['smtpServer'],
+#                            smtpPort=config.smtpConf['smtpPort'],
+#                            useTls=config.smtpConf['useTls'],
+#                            useSmtps=config.smtpConf['useSmtps'],
+#                            smtpUser=config.smtpConf['smtpUser'],
+#                            smtpPassword=config.smtpConf['lookup'],
+#                            lookup=config.smtpConf['lookup'],
+#                            
messageFormatter=reporters.MessageFormatter(template_dir=config.smtpConf['template_dir'],
+#                                                                        
template_filename=config.smtpConf['template_filename'],
+#                                                                        
ctx=dict(statuses=results.Results),
+#                                                                        
template_type=config.smtp['template_type'],
+#                                                                              
 wantProperties=config.smtpConf['wantProperties'],
+#                                                                        
wantSteps=config.smtpConf['wantSteps'],
+#                                                                        
wantLogs=config.smtpConf['wantLogs']),
+#                            extraHeaders=config.smtpConf['extraHeaders'],
+#                            watchedWorkers=config.smtpConf['watchedWorkers'],
+#                            
messageFormatterMissingWorker=config.smtpConf['missingWorkers'])
 # )
 
 # services.append(
-- 
2.7.4

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to