[Buildbot-devel] Multiple SVN repositories

Brad Hards bradh at frogmouth.net
Fri Nov 11 06:49:26 UTC 2005


On Friday 11 November 2005 17:08 pm, Joel Becker wrote:
> 	I've a simple problem.  It doesn't look like a single
> buildmaster can handle multiple repositories.  I'm using Subversion, and
> like many, many Subversion users, we use one repository per project instead
> of a huge repository with many modules (ala CVS). But PBChangeSource does
> not have a way to specify the
> repository.  So each of my AnyBranchSchedulers sees a change as relevant
> to its own repository.  This results in any change to any repository
> causing a build in _all_ repositories.
A single builder can do more than one target. For example, I have a builder on 
an AMD64 box, with four targets. In my system, each of those targets pulls 
from the same repository (albeit different parts), however there is nothing 
that makes it so.

If you do something like:
factory1 = factory.GNUAutoconf(source=s(step.SVN, svnurl="repo1.example.com", 
mode="update")
factory2 = factory.GNUAutoconf(source=s(step.SVN, svnurl="repo2.example.com", 
mode="update")
factory3 = factory.GNUAutoconf(source=s(step.SVN, svnurl="repo3.example.com", 
mode="update")
factory4 = factory.GNUAutoconf(source=s(step.SVN, svnurl="repo3.example.com", 
mode="update")

host1_repo1 = {'name': "host1_repo1",
                             'slavename': "host1",
                             'builddir': "repo1",
                             'factory': factory1
                             }
host1_repo2 = {'name': "host1_repo2",
                             'slavename': "host1",
                             'builddir': "repo2",
                             'factory': factory2
                             }
host1_repo3 = {'name': "host1_repo3",
                             'slavename': "host1",
                             'builddir': "repo3",
                             'factory': factory3
                             }
host1_repo4 = {'name': "host1_repo4",
                             'slavename': "host1",
                             'builddir': "repo4",
                             'factory': factory4
                             }

host2_repo1 = {'name': "host1_repo1",
                             'slavename': "host2",
                             'builddir': "repo1",
                             'factory': factory1
                             }
host2_repo2 = {'name': "host1_repo2",
                             'slavename': "host2",
                             'builddir': "repo2",
                             'factory': factory2
                             }
host2_repo3 = {'name': "host1_repo3",
                             'slavename': "host2",
                             'builddir': "repo3",
                             'factory': factory3
                             }
host2_repo4 = {'name': "host1_repo4",
                             'slavename': "host2",
                             'builddir': "repo4",
                             'factory': factory4
                             }

#repeat for host 3 and 4, if required

#add a callable that returns true if commit is from repo1
def repo1selector(thisChange):
	#something

#same for repo2
def repo2selector(thisChange):
	#something else
#nore for repo3 and 4

repo1sched = Scheduler(name='repo1shced', builderNames=['host1_repo1', 
'host2_repo1'], fileIsImportant=repo1selector)

repo2sched = Scheduler(name='repo2sched, builderNames=['host1_repo2', 
'host2_repo2'], fileIsImportant=repo2selector)
#more for repo3 and 4

c['schedulers'] = [repo1sched, repo2sched]


Does that do what you need?

Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20051111/b7b62915/attachment.bin>


More information about the devel mailing list