VSoft Technologies Blogs

rss

VSoft Technologies Blogs - posts about our products and software development.

With the rise of  Distributed Version Control systems in recent years, the use of branching has exploded. Developers using DVCS think nothing of creating new branches,  a common pattern being the use if Feature Branches and Personal branches.

In older Continuous Integration Servers (like our own FinalBuilder Server), managing builds on branches was somewhat problematic. In Continua CI, if you use Git, Mercurial or Subversion, working with branches is easy.

For branch aware Repository types in Continua CI, you can select which branches to monitor, either a Single Branch, All Branches or By Pattern (Subversion only supports Single Branch or By Pattern).

If we select By Pattern, the UI changes to allow us to specify the pattern we want to match on. The pattern is a Regular Expression that matches the branch names (as seen & presented by Continua CI). In the example below, the Continua CI repository would see commits in branches "master", and any branches that start with feature- 

This is only half the story though. Changing the branches that the Continua CI Repository will monitor only controls which commits Continua CI knows about , but it doesn't control which branches will be built. 

In most cases, you would just leave the repository monitoring all branches, because it is Repository Triggers which control which branches are built.

Repository Triggers point to a single Repository (you can however define as many repositories and triggers as you like), and they allow you monitor commits from All Branches, the Default Branch or a Pattern matched Branch

So lets say we want to control how our build is done when using a feature branch. All we need to do is define a Trigger and specify the patten for the feature branch names

 

Notice that we can also define the values of Configuration Variables which will be set when the trigger queues the build. What this means is we can use the same Configuration to build dev/release/feature branches, and enable and disable parts of the build based on the variables set by the trigger (using the flow control actions in the stage editor). So for example, if our release branches all started with release-

The Branch Pattern Matching feature in Continua CI makes building Feature Branches simple.

Showing 0 Comment


Comments are closed.