changeset 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
files autobot/template/master/master.cfg autobot/template/template.py
diffstat 2 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/template/master/master.cfg	Thu Jan 06 14:32:21 2011 -0800
+++ b/autobot/template/master/master.cfg	Thu Jan 06 15:09:14 2011 -0800
@@ -4,7 +4,7 @@
 
 ####### BUILDSLAVES
 from buildbot.buildslave import BuildSlave
-c['slaves'] = [BuildSlave("{{botname}}", "{{passwd}}")]
+c['slaves'] = [BuildSlave("{{slave}}", "{{passwd}}")]
 c['slavePortnum'] = {{slaveport}}
 
 ####### CHANGESOURCES
@@ -14,7 +14,7 @@
 ####### SCHEDULERS
 from buildbot.scheduler import Scheduler
 c['schedulers'] = []
-c['schedulers'].append(Scheduler(name="all", branch='{{branch}}',
+c['schedulers'].append(Scheduler(name="all", branch=None,
                                  treeStableTimer=1,
                                  builderNames=["buildbot-full"]))
 
@@ -25,7 +25,7 @@
 
 # define builder
 b1 = {'name': "buildbot-full",
-      'slavename': "{{botname}}",
+      'slavename': "{{slave}}",
       'builddir': "full",
       'factory': f1,
       }
--- a/autobot/template/template.py	Thu Jan 06 14:32:21 2011 -0800
+++ b/autobot/template/template.py	Thu Jan 06 15:09:14 2011 -0800
@@ -5,22 +5,31 @@
 """
 
 import sys
-from makeitso.template import 
+from makeitso.cli import parser as optionparser
+from makeitso.template import MakeItSoTemplate
+from makeitso.template import Variable
 
 class AutobotMasterTemplate(MakeItSoTemplate):
     name = 'autobot-master'
+    description = 'template for the autotools buildbot master'
     templates = ['master']
+    vars = [Variable('slave', 'buildslave name', 'slave'),
+            Variable('passwd', default='passwd'),
+            Variable('slaveport', 'port to talk to slaves on', default=9010),
+            Variable('htmlport', 'port for waterfall display', default=8010)]
+
+    def pre(self, **variables):
+        variables['factory'] = 'foo'
 
 class AutobotSlaveTemplate(MakeItSoTemplate):
     name = 'autobot-slave'
+    description = 'template for the autotools buildbot slave'
     templates = ['slave']
     look = True
 
 def main(args=sys.argv[1:]):
-    usage = '%prog [options]'
     parser = OptionParser(usage=usage)
     options, args = parser.parse_args(args)
 
 if __name__ == '__main__':
     main()
-