[users at bb.net] run a builder everywhere?
Greg MacDonald
gmacdonald at trionworlds.com
Thu Mar 24 00:01:40 UTC 2016
Is there an easier way to run a builder on several nodes at once? I have the following config to cleanup the compile checks on all the workers, which works great but it produces a lot of extra builders; one for each worker. Am I going about this wrong?
def configResetAll(c, branch, ccLock):
capitalBranch = branch.capitalize()
resetAllFactory = util.BuildFactory()
resetAllFactory.workdir = '.'
resetAllFactory.addStep(ObservedShellCommand(name='rd',
command=['cmd.exe', '/c', 'rd /s /q %s_DCC\src\intermediates' % capitalBranch],
workdir='.',
flunkOnFailure=True,
haltOnFailure=False,
))
resetAllFactory.addStep(ObservedShellCommand(name='rd',
command=['cmd.exe', '/c', 'rd /s /q %s_RCC\src\intermediates' % capitalBranch],
workdir='.',
flunkOnFailure=True,
haltOnFailure=False,
))
resetAllFactory.addStep(steps.VS2013(name='clean',
projectfile=r"%s_DCC\src\hot-all-vc12.sln" % capitalBranch,
config="Debug",
mode="clean",
flunkOnFailure=True,
haltOnFailure=False,
))
resetAllFactory.addStep(steps.VS2013(name='clean',
projectfile=r"%s_RCC\src\hot-all-vc12.sln" % capitalBranch,
config="Release",
mode="clean",
flunkOnFailure=True,
haltOnFailure=False,
))
builderNames = []
slaves = getSlaves(c, roles=['compile_check'])
for slave in slaves:
builderName = capitalBranch + "_CC_ResetAll_" + slave.properties['short_name']
c['builders'].append(
BuilderConfig(name=builderName,
slavenames=[slave.name],
slavebuilddir='.',
factory=resetAllFactory,
tags=[branch + '_cc_resetall'],
))
builderNames.append(builderName)
triggerSchedulerName = capitalBranch + "_CC_ResetAll_Trigger"
c['schedulers'].append(schedulers.Triggerable(name=triggerSchedulerName,
builderNames=builderNames))
triggerFactory = util.BuildFactory()
triggerFactory.workdir = '.'
triggerFactory.addStep(steps.Trigger(name="reset_%s_cc" % branch, schedulerNames=[triggerSchedulerName], waitForFinish=True, flunkOnFailure=True, haltOnFailure=True))
builderName = capitalBranch + "_CC_ResetAll"
c['builders'].append(
BuilderConfig(name=builderName,
slavenames=[x.name for x in slaves],
slavebuilddir='.',
factory=triggerFactory,
tags=[branch + '_cc_resetall'],
))
c['schedulers'].append(schedulers.ForceScheduler(
name=capitalBranch + "_CC_ResetAll_Scheduler",
builderNames=[builderName],
codebases=[CodebaseParameter(codebase='', hide=True)]
))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160324/f5f6728a/attachment.html>
More information about the users
mailing list