Release Management provides the option to trigger a release from a build. But to use this feature, some additional logic has to be added to the default build process template. This article details how to make the necessary modifications.
If you are currently using the TFS 2013 default build process template
If you are using the TFS 2013 default build process template all you need to do is use the corresponding release management build process template.
- If using GitTemplate.12.xaml then use ReleaseGitTemplate.12.xaml.
- If using TfvcTemplate.12.xaml then use ReleaseTfvcTemplate.12.xaml.
If you are currently using a customized TFS 2013 build process template
If you have customized the TFS 2013 default build process template (GitTemplate.12.xaml or TfvcTemplate.12.xaml), then you can use the snippets file (ReleaseTemplate.12.Snippets.xaml) to help you integrate the release-specific customizations into your own custom build process template.
Modifying your own custom build process template
The snippets file only contains sections with start / end markers to indicate which parts to copy.
The following is a sample section with start / end tags that is surrounded by some context.
Where
The only exception is the Activity element, where you will need to copy the attributes in the snippets file and add them to your custom build process template, without removing any existing attributes.
Using the Release Management build process template
Consider the following when using the Release Management build process template.
- When using the functionality to automatically trigger Releases from a Build, you will need to install a Release Management client on your TFS Build Server. After installation, restart the TFS Build Services.
- While editing the Build Definition, Set the Release Build parameter to TRUE, to indicate that you want the build to be released.
- Specify the Target Stage for the Release in the Release Target Stage parameter. Leave blank to allow the Release to go through all the Stages defined in the Release Path. The check is case sensitive so make sure to match the name of the Target Stage verbatim.
- Ensure the Release Template is configured to match the Build Definition and the property Can Trigger a Release from a Build? is set.
For more clarity on points (2) and (3) above please see the sample image below.