To enable triggering a release in Visual Studio Release Management from TFS build requires few configuration steps to be performed.
First step is to allow triggering a release in the Release Template. This can be done in release template properties.
Select “Can Trigger a Release from a Build?” option.
Next step is to change the TFS build template to Special Template capable of triggering a release. If there is customized build template being used currently, it is possible to change it to support triggering a release. How to do that explained in below link.
http://blogs.msdn.com/b/visualstudioalm/archive/2013/12/09/how-to-modify-the-build-process-template-to-use-the-option-trigger-release-from-build.aspx
If default build template is used as shown above, change it to template available with Release Management Client. This can be found at below shown location of a Release management Client installed machine.
Add ReleaseTfvcTemplate.12 to build process templates and select it as the build template in the build definition. If TFS 2012 ReleaseDefaultTemplate.11.1 should be used. If Git is used as source control repository ReleaseGitTemplate is available.
This template has a category for Release.
Set Release Build to true.
To demonstrate the release with TFS build, below simple ASP.Net web application is altered with a simple change and tested in Development environment.
The depsvr which is configured to deployed using VS Release Management still has old version and development (localhost) shows the change,
Check in the change.
CI build (Build each check in) is successful.
Next step is to trigger a build with output and initiate a release via that build.
Wait for release to be triggered with the TFS build.
New release is not triggered and Build failed with “Build service account needs to be a system user in Release Management Server”.
Add the TFS Build Service account as a service account in Release Management.
.
Retry Build.
Second attempt failed with same error.
The Q&A in below link gives a hint.
http://stackoverflow.com/questions/20901507/error-the-account-running-the-tfs-build-service-tfsbuildservices-needs-to
Hint is the build server needs to be installed with Release Management Client and configured to access Release Management Server.
Next attempt of the build successfully triggers the release in Release Management Server.
Acceptance Deployment step should be set to automated in release path of Release triggered by a TFS Build.
Build succeeds and Release succeeds.
DepSvr is updated with the change in the Demo web application.
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Dynamic block allows to create nested multi level block structures in terraform code. Conditional usage of such blocks are really useful in...
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
1 comment:
hi there
this only works with microsoft solutions. do you have any ideas on how to get it working with java solutions. EG, war files?
Post a Comment