Buildbot no longer supports Python 2.7 on the Buildbot master.
This page documents the latest, unreleased version of Buildbot. For documentation for released versions, see http://docs.buildbot.net/current/.
2.5.22. Multiple-Codebase Builds¶
What if an end-product is composed of code from several codebases? Changes may arrive from different repositories within the tree-stable-timer period. Buildbot will not only use the source-trees that contain changes but also needs the remaining source-trees to build the complete product.
For this reason, a Scheduler can be configured to base a build on a set of several source-trees that can (partly) be overridden by the information from incoming
As described in Source-Stamps, the source for each codebase is identified by a source stamp, containing its repository, branch and revision. A full build set will specify a source stamp set describing the source to use for each codebase.
Configuring all of this takes a coordinated approach. A complete multiple repository configuration consists of:
a codebase generator
Every relevant change arriving from a VC must contain a codebase. This is done by a
codebaseGeneratorthat is defined in the configuration. Most generators examine the repository of a change to determine its codebase, using project-specific rules.
schedulerhas to be configured with a set of all required
codebasesto build a product. These codebases indicate the set of required source-trees. In order for the scheduler to be able to produce a complete set for each build, the configuration can give a default repository, branch, and revision for each codebase. When a scheduler must generate a source stamp for a codebase that has received no changes, it applies these default values.
multiple source steps - one for each codebase
A Builder’s build factory must include a source step for each codebase. Each of the source steps has a
codebaseattribute which is used to select an appropriate source stamp from the source stamp set for a build. This information comes from the arrived changes or from the scheduler’s configured default values.
Each source step has to have its own
workdirset in order for the checkout to be done for each codebase in its own directory.
Ensure you specify the codebase within your source step’s Interpolate() calls (e.g.
http://.../svn/%(src:codebase:branch)s). See Interpolate for details.
codebaseGenerator that returns non-empty (not
'') codebases will change the behavior of all the schedulers.