Custom builders for each OS type
This commit is contained in:
parent
1e6918cb2b
commit
0036d1e131
|
@ -11,11 +11,15 @@ test/buildbot/master/master.cfg.sample
|
||||||
test/buildbot/master/twistd.log
|
test/buildbot/master/twistd.log
|
||||||
test/buildbot/master/twistd.pid
|
test/buildbot/master/twistd.pid
|
||||||
test/buildbot/master/state.sqlite
|
test/buildbot/master/state.sqlite
|
||||||
test/buildbot/master/vagrant-*/
|
test/buildbot/master/osx-*/
|
||||||
|
test/buildbot/master/linux-*/
|
||||||
|
test/buildbot/master/win-*/
|
||||||
test/buildbot/slave/twistd.hostname
|
test/buildbot/slave/twistd.hostname
|
||||||
test/buildbot/slave/twistd.log
|
test/buildbot/slave/twistd.log
|
||||||
test/buildbot/slave/twistd.pid
|
test/buildbot/slave/twistd.pid
|
||||||
test/buildbot/slave/vagrant-*/
|
test/buildbot/slave/osx-*/
|
||||||
|
test/buildbot/slave/linux-*/
|
||||||
|
test/buildbot/slave/win-*/
|
||||||
Vagrantfile
|
Vagrantfile
|
||||||
.vagrant
|
.vagrant
|
||||||
|
|
||||||
|
|
|
@ -23,17 +23,26 @@ def get_vagrant_builders(branch, slaves):
|
||||||
This returns a list of the builders that represent the entire
|
This returns a list of the builders that represent the entire
|
||||||
chain for a given branch (unit, acceptance, packaging builds).
|
chain for a given branch (unit, acceptance, packaging builds).
|
||||||
"""
|
"""
|
||||||
|
platforms = ["linux", "osx", "win"]
|
||||||
|
builders = []
|
||||||
|
|
||||||
|
for platform in platforms:
|
||||||
|
platform_slaves = [s.slavename for s in slaves if platform in s.slavename]
|
||||||
|
|
||||||
|
if len(platform_slaves) > 0:
|
||||||
unit = BuilderConfig(
|
unit = BuilderConfig(
|
||||||
name="vagrant-%s-unit" % branch,
|
name="%s-%s-unit" % (platform, branch),
|
||||||
slavenames=[s.slavename for s in slaves],
|
slavenames=platform_slaves,
|
||||||
factory=make_vagrant_unit_factory(branch))
|
factory=make_vagrant_unit_factory(branch))
|
||||||
|
|
||||||
acceptance = BuilderConfig(
|
acceptance = BuilderConfig(
|
||||||
name="vagrant-%s-acceptance" % branch,
|
name="%s-%s-acceptance" % (platform, branch),
|
||||||
slavenames=[s.slavename for s in slaves],
|
slavenames=platform_slaves,
|
||||||
factory=make_vagrant_acceptance_factory(branch))
|
factory=make_vagrant_acceptance_factory(branch))
|
||||||
|
|
||||||
return [unit, acceptance]
|
builders.extend([unit, acceptance])
|
||||||
|
|
||||||
|
return builders
|
||||||
|
|
||||||
def make_vagrant_unit_factory(branch):
|
def make_vagrant_unit_factory(branch):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -8,15 +8,17 @@ from buildbot.schedulers.basic import (
|
||||||
Dependent,
|
Dependent,
|
||||||
SingleBranchScheduler)
|
SingleBranchScheduler)
|
||||||
|
|
||||||
def get_schedulers():
|
def get_schedulers(builders):
|
||||||
# Run the unit tests for master
|
# Run the unit tests for master
|
||||||
|
unit_builders = [b.name for b in builders if "unit" in b.name]
|
||||||
master_unit = SingleBranchScheduler(name="master-unit",
|
master_unit = SingleBranchScheduler(name="master-unit",
|
||||||
change_filter=ChangeFilter(branch="master"),
|
change_filter=ChangeFilter(branch="master"),
|
||||||
treeStableTimer=60,
|
treeStableTimer=60,
|
||||||
builderNames=["vagrant-master-unit"])
|
builderNames=unit_builders)
|
||||||
|
|
||||||
|
acceptance_builders = [b.name for b in builders if "acceptance" in b.name]
|
||||||
master_acceptance = Dependent(name="master-acceptance",
|
master_acceptance = Dependent(name="master-acceptance",
|
||||||
upstream=master_unit,
|
upstream=master_unit,
|
||||||
builderNames=["vagrant-master-acceptance"])
|
builderNames=acceptance_builders)
|
||||||
|
|
||||||
return [master_unit, master_acceptance]
|
return [master_unit, master_acceptance]
|
||||||
|
|
|
@ -63,5 +63,5 @@ c['slavePortnum'] = 9989
|
||||||
c['slaves'] = get_slaves_from_config(options.slaves)
|
c['slaves'] = get_slaves_from_config(options.slaves)
|
||||||
c['status'] = get_status(options)
|
c['status'] = get_status(options)
|
||||||
c['builders'] = get_builders(c['slaves'])
|
c['builders'] = get_builders(c['slaves'])
|
||||||
c['schedulers'] = get_schedulers()
|
c['schedulers'] = get_schedulers(c['builders'])
|
||||||
c['change_source'] = get_change_sources()
|
c['change_source'] = get_change_sources()
|
||||||
|
|
Loading…
Reference in New Issue