Trigger Agent Based Release in RM from vNext Build in TFS 2015

In Continuous integration (CI), one has the requirement to trigger release of the build artifacts to the intended environment. In TFS 2015 and RM 2015, it can be achieved using the below steps:

  1. Release in the release management needs to be configured. I am not going to cover how to configure it here in this article but for the triggering perspective, below setting should be done in it: image  
  2. On the build machine, install and configure the Release Management 2015 client. It should be configured successfully.image
  3. In the Release Management Client, add user under whose context the vNext build agent is running. For doing this activity, Go to Administration > Manage Users and click New to add the user.
  4. Now in the vNext build definition, add a new Task of type “Command Line”: image
  5. Once this task is added, Name it and enter the below data in it:      
    Tool ReleaseManagementBuild.exe
    Arguments –rt ‘MyReleaseTemplateName’ –pl ‘MyPackageLocation’ –ts ‘ReleaseTargetStage’ 
    Example –  
    Tool C:\Program Files (x86)\Microsoft Visual Studio 14.0\Release Management\Client\bin\ReleaseManagementBuild.exe
    Arguments -rt ReleaseTemplateTest -pl \\DropServer\TFS_Drop\$(Build.DefinitionName)\$(Build.BuildNumber) -ts QA  


  6. Enable Continuous integration (CI) from the Triggers tab of the build definition. image

Now once the above steps are done, agent based release can be triggered from the vNext based build definition in TFS 2015 and you will get below information from the build console: image

——End of the Article——

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s