TFS - Deploy test versions of different branches

935 Views Asked by At

I'm looking for a good way to manage deployment to a test environment of several branches of the same codebase. My setup includes a Main branch and several Dev branches:

  • Main
  • Dev1 (feature set 1)
  • Dev2 (feature set 2)
  • etc...

These are all part of a continuous integration process where they get deployed daily for testing. At the moment there is a "Testing" configuration, with corresponding Web.config transformation and publish profile, that control things like connection strings (Web.config) and location to deploy the application to (MSDeploy configuration in the publish profile).

It all worked fine until merging started happening. Once we start merging code, the different Web.config transformations and publish profiles inevitably get mixed up, and Visual Studio happily merges everything without finding conflicts, resulting in situations like the Main branch being deployed to the Dev1 location, or the Dev2 application getting configured with Main's connection string.

I can think of one solution, which is creating a solution configuration for each branch, and the corresponding Web.config transformations and publish profiles. This would definitely do the job of keeping everything separate and safe from merging problems, but it creates a whole lot of new configuration files all over the place. And on top of that it makes the task of creating or deleting a branch much more complicated.

Is there another way of doing it?

1

There are 1 best solutions below

0
On

You should look at Release Management for Visual Studio 2013. You can configure a release pipeline with different variables at each environment that you are deploying to.

You would then only have two transformations. One, the default, for localhost development. And a second for use on the build server that contains the RM replaceable variables.

http://nakedalm.com/building-release-pipeline-release-management-visual-studio-2013/