changeset 271:13107cdc1e33

move to mozinfo and start adding email
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 31 Jul 2012 13:15:40 -0700
parents c77b946e4496
children 72645086a0b7
files autobot/template.py autobot/template/master/master.cfg autobot/template/master/master.ini setup.py
diffstat 4 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/template.py	Tue Jul 31 09:49:57 2012 -0700
+++ b/autobot/template.py	Tue Jul 31 13:15:40 2012 -0700
@@ -1,9 +1,10 @@
 #!/usr/bin/env python
 
 """
-templates for the A*Team's buildbot
+makeitso templates for the A*Team's buildbot
 """
 
+import mozinfo
 import os
 import string
 import sys
@@ -21,14 +22,7 @@
     from subprocess import call
 
 # default OS type
-# XXX this should use MozInfo when that's ready
-os_type=None
-if sys.platform.startswith('linux'):
-    os_type = 'linux'
-elif sys.platform.startswith('darwin'):
-    os_type = 'mac'
-elif sys.platform.startswith('win'):
-    os_type = 'win'
+os_type = mozinfo.os
 
 def print_descriptions():
     """print factory descriptions"""
@@ -54,7 +48,9 @@
             Variable('publichtmlport', 'port for public waterfall display', default=8011, cast=int),
             Variable('botname', 'name of IRC bot', default='autobot-test'), # use autobot in production
             Variable('ircHost', 'IRC host', default='irc.mozilla.org'),
-            Variable('ircChannels', 'channels for the IRC bot ("-" for none)', default='#ateam-test') # use #ateam in production
+            Variable('ircChannels', 'channels for the IRC bot ("-" for none)', default='#ateam-test'), # use #ateam in production
+            Variable('domain', 'autobot domain name', default='localhost'),
+            Variable('recipients', 'email recipients for all projects')
             ]
 
     def pre(self, variables, output):
--- a/autobot/template/master/master.cfg	Tue Jul 31 09:49:57 2012 -0700
+++ b/autobot/template/master/master.cfg	Tue Jul 31 13:15:40 2012 -0700
@@ -121,6 +121,8 @@
         c['status'].append(words.IRC(host=irc_host, nick=nick,
                                      channels=config.master['channels']))
 
+# email notification
+
 # autolog
 #from autobot.status import autolog
 #c['status'].append(autolog.AutologStatus())
--- a/autobot/template/master/master.ini	Tue Jul 31 09:49:57 2012 -0700
+++ b/autobot/template/master/master.ini	Tue Jul 31 13:15:40 2012 -0700
@@ -8,6 +8,8 @@
 treeStableTimer = 30
 irc = {{botname}}@{{ircHost}}
 channels = {{ircChannels}}
+email = {{botname}}@{{domain}}
+recipients = {{recipients}}
 
 [slave:{{slave}}]
 os = {{os}}
--- a/setup.py	Tue Jul 31 09:49:57 2012 -0700
+++ b/setup.py	Tue Jul 31 13:15:40 2012 -0700
@@ -26,7 +26,8 @@
           'buildbot-slave>=0.8.5',
           'virtualenv',
           'MakeItSo',
-          'GetLatestTinderbox'
+          'GetLatestTinderbox',
+          'mozinfo'
       ],
       entry_points="""
       # -*- Entry points: -*-