Question

Let's say we have 2 branches: Development and Production Also we have 2 servers on Azure in different affinity groups.

Is there a way to automate the process so that on person choosing version X that was 'accepted' in development merges code into production branch and publishes to production server ?

Ideally I would want to have a Changset# and set to production that will merge the production branch (with all the required previous changesets) and get published to server.

The chosen changeset does not have to be the latest on development.

Was it helpful?

Solution

Following 4 steps should do it for you:

1) Create a new build definition for Development branch using TfvcTemplate.12.xaml (only available in TFS 2013) as it has post-build script option (see image below).

2) Create a powershell script to merge the changes to branch using tf merge command. You will have to pass the changeset # to the script using Post-build script arguments. See this URL: http://msdn.microsoft.com/en-us/library/bd6dxhfy

3) When you run the build set the Get Version(see image below) and it will take the changes from that version. After the build is successful it will merge the changes to the production branch using the step 2 above.

4) Create another build for the Production branch and use the link specified in the below answer to deploy the code to azure on check-in to the branch.

Can I automatically update a live site after each commit using TFVC and Azure?

enter image description here

You can also look at InRelease (link below) for Release Management and automation (not supported for Visual Studio Team Services yet)

http://www.visualstudio.com/en-us/explore/release-management-vs.aspx

Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top