Support for multiple repositories using Buildbot
Asked Answered
C

4

12

Currently Buildbot does not support multiple repositories. If one desires to have this then separate instances of Buildbot need to be run.

Still I'm curious if anyone has come up with a creative workaround to get this feature working anyway.

Chiastolite answered 8/5, 2010 at 19:46 Comment(1)
buildbot does support multiple repositories pretty good actually, and this since 0.8.7p1 (November 21th, 2012) See: docs.buildbot.net/0.8.7p1/relnotes/index.html#featuresDinitrobenzene
B
21

Update

This answer received a few downvotes recently, please note that this answer applies to the releases of buildbot that were published/used around the end of 2012/beginning of 2013 and may not be applicable for future versions.

Original Answer

As @Macke said, buildbot (>= 0.8.x) supports multiple projects/repositories. This is done with configuration like the following:

# Set configuration to watch the Git repository for possible
# changes. When a change does occur the schedulers will be
# notified with the project data (TestProj).
c['change_source'] = []
c['change_source'].append(
        GitPoller( 
                repourl ='git://github.com/SO/my_test_project.git',
                project = 'TestProj',  
                branch  = 'master',
                workdir = '/home/buildmaster/repos/TestProj'
        )
)

# Set the schedule to run on each change, but only for the project
# specified above via the project information.
c['schedulers'] = []
c['schedulers'].append(
        SingleBranchScheduler(
                name = "TestProj-master",
                builderNames = ['TestProj-master-builder'],
                change_filter = ChangeFilter(
                        project = 'TestProj',
                        branch  = 'master'
                )
        )
)

You can see that the project parameter in the change source is then used again in the scheduler's change_filter property to ensure that the scheduler only responds to that particular change source. This allows you to configure multiple change sources and multiple schedulers responding to explicitly chosen change sources.

Bruni answered 22/8, 2011 at 13:54 Comment(0)
C
3

Since the 0.8.7p1 release, buildbot supports multiple codebases

Chinaman answered 28/8, 2014 at 9:31 Comment(1)
how they can be used? Could you please provide the minimal working example for multiple codebases feature?Planula
F
1

Indeed i don't get the reason why you say that it does not support multiple repositories....you can create a poller for each repository and multiple schedulers that ping the different pollers and get the builds for many different repositories (either on the same machine where the master runs, or you can have a dedicated slave on a different box).

You want to avoid to have multiple instances, but for example, master and slave coexist on the same machine even if is a pain to start and stop them in order, otherwise you get conflict errors :)

Foghorn answered 8/2, 2011 at 21:16 Comment(0)
L
0

|> Currently Buildbot does not support multiple repositories.

I don't really understand the question.. sorry. Do you mean that you have to run multiple master servers? It is actually advised by the buildbot devs to do so, but the contrary works for me: you can have in the same master.cfg multiple slaves (columns in the waterfall) and for each or them a BuildFactory with different first steps of the type: Git(repourl=...) and/or Mercurial(repourl=...) etc.

Each will clone/pull from different repositories and you can even add some more checkouts that are needed in subsequent steps (using maven or directly your scm client). The only issue with having a unique master.cfg file is that all builders will have only one method for getting notifications of changes; we have for example PBChangeSource() (master is notified by remote code, it has nothing to do). If for instance you have an SCM with good PBChangeSource support (e.g., svn, hg, git) and an other ones with bad support (e.g., MKS) then you should have two master server instances in order to cope with that.

Hope it'll help.

Leung answered 30/6, 2010 at 9:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.