View Source

h1. Situation
Set up multiple configurations to build multiple branches of a project. Common settings of these branch configurations such as SCM and step definitions should be shared to reduce build setup work and maintenance headache.

h1. Resolution
Navigate to the [demo project|http://demo.pmease.com/children/68]. It has three child configurations:
# Configuration [1.x|http://demo.pmease.com/overview/69] builds against the 1.0 branch.
# Configuration [2.x|http://demo.pmease.com/overview/70] builds against the 2.0 branch.
# Configuration [3.x|http://demo.pmease.com/overview/71] builds against the 3.0 branch.

All these child configurations inherit repository and step definitions from the parent configuration. However the property _Url to Checkout_ of [repository definition in parent configuration|http://demo.pmease.com/settings/68/repositories] is parameterized as below:
{code}
https://svn.pmease.com/demos/componentA/branches/${vars.get("branch")}
{code}
This tells QuickBuild to use value of variable _branch_ to construct the url at checkout time. This variable is defined in each child configuration to reflect the real branch to build against. For example, for configuration [1.x|http://demo.pmease.com/overview/69], the branch variable is defined as _1.0_ at [variable setting of the configuration|http://demo.pmease.com/settings/69/variables].

With this setup, common settings of these branches are maintained at the parent configuration, while different branch configurations can still build against different branches. Modifications of the common settings will affect all child branch configurations.