# HG changeset patch # User Jeff Hammel # Date 1294436541 28800 # Node ID baee795ad6df84dafbfbc2a6c50f6880aa05bcc9 # Parent 9ad3a9e220bce496ddf486de4fa594930985b39b stub out actually calling buildbot diff -r 9ad3a9e220bc -r baee795ad6df autobot/template.py --- a/autobot/template.py Fri Jan 07 13:05:10 2011 -0800 +++ b/autobot/template.py Fri Jan 07 13:42:21 2011 -0800 @@ -11,6 +11,11 @@ from makeitso.template import Variable from projects import factories +try: + from subprocess import check_call as call +except ImportError: + from subprocess import call + class AutobotMasterTemplate(MakeItSoTemplate): name = 'autobot-master' description = 'template for the autotools buildbot master' @@ -37,6 +42,18 @@ else: raise AssertionError("No factory provided") + def post(self, variables + """ + called after the template is applied + """ + # import pdb; pdb.set_trace() + oldcwd = os.getcwd() + os.chdir() + command = ['buildbot', 'create-master', vars['master'] ] + print ' '.join(command) + call(command) + os.chdir(oldcwd) + class AutobotSlaveTemplate(MakeItSoTemplate): name = 'autobot-slave' description = 'template for the autotools buildbot slave'