
One of the easiest ways to not only enforce build immutability, but also have a history of what
code files were used for a particular build, is to create a label with your Build Number
whenever you create a build.
In some source control systems (SVN, CVS, etc.), a label is created by creating
a fork (or branch) of the code. In others (TFS, Vault, etc), there is an operation
called label. BuildMaster supports both operations through different actions:

Each of the actions depend on a Source Control Provider that you can add from the
administration section. We support a whole bunch of source control systems, and
they're all relatively easy to set-up. Here's the Create Source Control Provider
page for AccuRev.

Once your source control is set-up, it's just a matter of combining two actions
(either Branch + Get Latest or Label + Get Labeled) and using a variable (%BLDNO%).
Here is what it looks like in our set-up of BuildMaster when we deploy to our integration
environment:

We're using %RELNO%.%BLDNO% as the label, so when the action executes it will label
/TRUNK with something like, 2.4.1.9. As an aside, you'll see that the fourth action
in this group (Create File) is used to
Automatically Version Assemblies with BuildMaster.
Once a build has gone through some initial testing, we'll promote to another testing
environment. But as part of this process, we'll build without the DEBUG and other
symbols. Since we've already labeled, we just get by label.
