Learn to use Visual Studio, Visual Studio Online, Application Insights and Team Foundation Server to decrease rework, increase transparency into your application and increase the rate at which you can ship high quality software throughout the application lifecycle
Visual Studio Release Management 2013 Update 2 RC release ships with an updated Release command line tool.
The new options of that command line tool opens new possibilities in terms of continuous deployment (triggering a Release from a check-in/build). You can now trigger a Release from any CI Server. You can also implement continuous deployment with RM and Visual Studio Online if the TFS build agent used is on prem. This article will focus on RM and VS Online, but the information here can help in setting up RM with any CI Server.
Build Template modification
In order to trigger a new Release, we need to add a process call to the RM command line tool within your build execution. The process command will look like this:
ReleaseManagementBuild.exe –rt ‘MyReleaseTemplateName’ –pl ‘MyPackageLocation’ –ts ‘ReleaseTargetStage’
Name of the release template to use with this release. Value is Case sensitive
The drop location of the build. This will be used as your source through the entire Release Path.
The final state to deploy this build too. This value is optional. If left blank the build will be released to all stages. Value is Case sensitive.
When using TFS, modify your build template by following the steps of the “Modifying your own custom build process template” section of the following article. However, make sure to use the snippets file attached to this article.
Triggering a build
Once the build template modifications are applied, the build definition will show a new section of parameters. Consider the following when using the Release Management build process template.
The snippets file you have posted is missing the following:
xmlns:si="clr-namespace:System.IO;assembly=mscorlib" (in <Activity>)
<x:Property Name="ProcessReleaseTokens" Type="InArgument(x:Boolean)" />
<x:Property Name="ReleaseTokensFolderPath" Type="InArgument(x:String)" />
If you try to merge with TfvcTemplate.12.xaml you'll get errors without those lines.
One question regarding the -pl parameter. Is it possible to add more than one package location, e. g. for each component a single pl? With the client you're able to. Let's assume you added 2 components with Builds externally than the client is asking for 2 locations....
Where is the "Modifying your own custom build process template" section of this article? Am I missing something?
Thanks, TfvcTemplate.12.xaml was updated after this post. I have now updated the snippets file.
This is not possible at the moment. But it is in our backlog.
That section is in the linked article. I will change the wording to make it more obvious.
Is there any way to see deployment errors returned when this command is executed? Currently it states "ERROR: The deployment for release template '<template>' has not been completed successfully. Check the releases history for more details."
@Tommy The specific error(s) (and logs) are only available in the corresponding Release. You will need to open up the ReleaseManagement client to diagnose further.