Mercurial > hg > autobot
comparison autobot/template.py @ 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 | aa36f82313f1 |
children | 72645086a0b7 |
comparison
equal
deleted
inserted
replaced
270:c77b946e4496 | 271:13107cdc1e33 |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 """ | 3 """ |
4 templates for the A*Team's buildbot | 4 makeitso templates for the A*Team's buildbot |
5 """ | 5 """ |
6 | 6 |
7 import mozinfo | |
7 import os | 8 import os |
8 import string | 9 import string |
9 import sys | 10 import sys |
10 from makeitso.cli import MakeItSoCLI | 11 from makeitso.cli import MakeItSoCLI |
11 from makeitso.template import assemble | 12 from makeitso.template import assemble |
19 from subprocess import check_call as call | 20 from subprocess import check_call as call |
20 except ImportError: | 21 except ImportError: |
21 from subprocess import call | 22 from subprocess import call |
22 | 23 |
23 # default OS type | 24 # default OS type |
24 # XXX this should use MozInfo when that's ready | 25 os_type = mozinfo.os |
25 os_type=None | |
26 if sys.platform.startswith('linux'): | |
27 os_type = 'linux' | |
28 elif sys.platform.startswith('darwin'): | |
29 os_type = 'mac' | |
30 elif sys.platform.startswith('win'): | |
31 os_type = 'win' | |
32 | 26 |
33 def print_descriptions(): | 27 def print_descriptions(): |
34 """print factory descriptions""" | 28 """print factory descriptions""" |
35 | 29 |
36 buffer = StringIO() | 30 buffer = StringIO() |
52 Variable('slaveport', 'port to talk to slaves on', default=9010, cast=int), | 46 Variable('slaveport', 'port to talk to slaves on', default=9010, cast=int), |
53 Variable('htmlport', 'port for waterfall display', default=8010, cast=int), | 47 Variable('htmlport', 'port for waterfall display', default=8010, cast=int), |
54 Variable('publichtmlport', 'port for public waterfall display', default=8011, cast=int), | 48 Variable('publichtmlport', 'port for public waterfall display', default=8011, cast=int), |
55 Variable('botname', 'name of IRC bot', default='autobot-test'), # use autobot in production | 49 Variable('botname', 'name of IRC bot', default='autobot-test'), # use autobot in production |
56 Variable('ircHost', 'IRC host', default='irc.mozilla.org'), | 50 Variable('ircHost', 'IRC host', default='irc.mozilla.org'), |
57 Variable('ircChannels', 'channels for the IRC bot ("-" for none)', default='#ateam-test') # use #ateam in production | 51 Variable('ircChannels', 'channels for the IRC bot ("-" for none)', default='#ateam-test'), # use #ateam in production |
52 Variable('domain', 'autobot domain name', default='localhost'), | |
53 Variable('recipients', 'email recipients for all projects') | |
58 ] | 54 ] |
59 | 55 |
60 def pre(self, variables, output): | 56 def pre(self, variables, output): |
61 factory = variables.get('factories') | 57 factory = variables.get('factories') |
62 if factory: | 58 if factory: |