Mercurial > hg > autobot
annotate autobot/template/template.py @ 4:eb289a46f4d3
make buildbot master template look close to what it should
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 Jan 2011 15:09:14 -0800 |
parents | 1d615610e442 |
children | b7c521f53bda |
rev | line source |
---|---|
1 | 1 #!/usr/bin/env python |
2 | |
3 """ | |
3 | 4 templates for the A*Team's buildbot |
1 | 5 """ |
6 | |
7 import sys | |
4
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
8 from makeitso.cli import parser as optionparser |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
9 from makeitso.template import MakeItSoTemplate |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
10 from makeitso.template import Variable |
1 | 11 |
12 class AutobotMasterTemplate(MakeItSoTemplate): | |
13 name = 'autobot-master' | |
4
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
14 description = 'template for the autotools buildbot master' |
1 | 15 templates = ['master'] |
4
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
16 vars = [Variable('slave', 'buildslave name', 'slave'), |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
17 Variable('passwd', default='passwd'), |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
18 Variable('slaveport', 'port to talk to slaves on', default=9010), |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
19 Variable('htmlport', 'port for waterfall display', default=8010)] |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
20 |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
21 def pre(self, **variables): |
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
22 variables['factory'] = 'foo' |
1 | 23 |
24 class AutobotSlaveTemplate(MakeItSoTemplate): | |
25 name = 'autobot-slave' | |
4
eb289a46f4d3
make buildbot master template look close to what it should
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
26 description = 'template for the autotools buildbot slave' |
1 | 27 templates = ['slave'] |
28 look = True | |
29 | |
30 def main(args=sys.argv[1:]): | |
31 parser = OptionParser(usage=usage) | |
32 options, args = parser.parse_args(args) | |
33 | |
34 if __name__ == '__main__': | |
35 main() |