From: Dan Scott Date: Mon, 16 May 2011 22:11:59 +0000 (-0400) Subject: Specify explicit branches for each builder, lazy-style X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=58e75cc909158e7ddadd39f22c633f711f31a1b4;p=working%2FOpenSRF.git Specify explicit branches for each builder, lazy-style SVNPoller was able to rely on change filters to look at every commit to the repository and hand them off to the scheduler accordingly; GitPoller, however, looks at one branch per poller, so we need to instantiate one poller per branch of interest. This gives us an opportunity to refactor our approach to be more programmatic. Signed-off-by: Dan Scott --- diff --git a/examples/buildbot.cfg b/examples/buildbot.cfg index f62e334..6f7ed65 100644 --- a/examples/buildbot.cfg +++ b/examples/buildbot.cfg @@ -27,10 +27,10 @@ c['slaves'] = [ c['slavePortnum'] = XXX # Branches and distros to build -osrf_branches = ('master', 'rel_1_6', 'rel_2_0') -osrf_distros = [('ubuntu-10.04-x86_64', 'opensrf-slave')] -eg_branches = ('master', 'rel_1_6_1', 'rel_2_0', 'rel_2_1') -eg_distros = [ +OSRF_BRANCHES = ('master', 'rel_1_6', 'rel_2_0') +OSRF_DISTROS = [('ubuntu-10.04-x86_64', 'opensrf-slave')] +EG_BRANCHES = ('master', 'rel_1_6_1', 'rel_2_0', 'rel_2_1') +EG_DISTROS = [ ('debian-6.00-x86_64', 'eg-slave'), # UPEI ('ubuntu-8.04-x86', 'eg-u804'), # GPLS ('ubuntu-10.04-x86', 'eg-u1004') # GPLS @@ -45,18 +45,22 @@ osrf_git = 'git://git.evergreen-ils.org/OpenSRF.git' # about source code changes from buildbot.changes import gitpoller -c['change_source'] = ( - gitpoller.GitPoller( +c['change_source'] = [] +for osrf_branch in OSRF_BRANCHES: + c['change_source'].append(gitpoller.GitPoller( project='OpenSRF', repourl=osrf_git, - workdir='/tmp/buildbot_osrf_work' - ), - gitpoller.GitPoller( + workdir='/tmp/buildbot_osrf_' + osrf_branch, + branch=osrf_branch + )) + +for eg_branch in EG_BRANCHES: + c['change_source'].append(gitpoller.GitPoller( project='Evergreen', repourl=eg_git, - workdir='/tmp/buildbot_eg_work' - ) -) + workdir='/tmp/buildbot_eg_' + eg_branch, + branch=eg_branch + )) ####### FILTERS from buildbot.schedulers.filter import ChangeFilter @@ -252,13 +256,13 @@ from buildbot.config import BuilderConfig c['builders'] = [] -for branch in osrf_branches: - for distro, slave in osrf_distros: +for branch in OSRF_BRANCHES: + for distro, slave in OSRF_DISTROS: build = "osrf-%s-%s" % (branch, distro) c['builders'].append(BuilderConfig(name=build, slavenames=slave, factory=osrf_factory)) -for branch in eg_branches: - for distro, slave in eg_distros: +for branch in EG_BRANCHES: + for distro, slave in EG_DISTROS: build = "evergreen-%s-%s" % (branch, distro) c['builders'].append(BuilderConfig(name=build, slavenames=slave, factory=eg_factory))