Mercurial > hg > autobot
changeset 143:5f98c1d4ae3c
stub out possibly what to do for a changefilter, maybe
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 24 Jan 2011 18:13:09 -0800 |
parents | 260cebcbb309 |
children | 21f07648ef88 |
files | autobot/template/master/master.cfg |
diffstat | 1 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/autobot/template/master/master.cfg Mon Jan 24 13:10:01 2011 -0800 +++ b/autobot/template/master/master.cfg Mon Jan 24 18:13:09 2011 -0800 @@ -18,6 +18,8 @@ # change sources sources = {'git': set(), 'hg': set()} + +builder_sources = {} # define builder factories from autobot.projects import factories as factory_dict @@ -44,6 +46,7 @@ _sources = f.sources.get(source_type, []) for source, branch in _sources: sources[source_type].add((source, branch)) + builder_sources.setdefault((source, branch), []).append(buildername) c['builders'] = builders @@ -54,23 +57,37 @@ from buildbot.changes.gitpoller import GitPoller from autobot.changes.poller import HgPoller -for source in sources['git']: - pass +pollInterval = 30 + +for repourl, branch in sources['git']: + c['change_source'].append(GitPoller( + repourl=repourl, + pollInterval=pollInterval, + branch=branch + )) for repourl, branch in sources['hg']: c['change_source'].append(HgPoller( repourl=repourl, - pollInterval=30, # should be configurable + pollInterval=pollInterval, branch=branch)) ####### SCHEDULERS from buildbot.scheduler import Scheduler +from buildbot.schedulers.filter import ChangeFilter buildernames = [i['name'] for i in builders] -c['schedulers'] = [] -c['schedulers'].append(Scheduler(name="all", branch=None, - treeStableTimer=1, - builderNames=buildernames)) +c['schedulers'] = [] + +treeStableTimer = 1 + +for (source, branch), buildernames in sources.values(): + change_filter = ChangeFilter(repository=source, branch=branch) + c['schedulers'].append(Scheduler(name="%s#%s" % (source, branch), + branch=branch, + treeStableTimer=treeStableTimer, + change_filter=change_filter, + builderNames=buildernames)) ####### STATUS TARGETS c['status'] = []