Question

So, we're using continuous integration in our current Team Foundation Server 2010 setup, and so far it's working great. We're doing shelvesets, the build is running on the Build Manager in TFS, and it's also running our MSTest unit tests for us.

My question is, and I can't seem to find any information on this, is how to move the "build unit" that is created by the Build Manager on TFS to another server?

Aka, how do I "promote" this build to our QA, staging, etc... environments?

Before, we've were using VS2010's Publish Web feature, which allows us to set up publish "profiles", and each profile can have a different web.config related to it. This is really useful for anything we keep in our config files, like db connection strings, paths to app servers, etc... changing automatically based on our Publish Profile. We choose the profile, build locally, then use the "Publish" button to move the entire app to another server.

This setup worked great for when there were two of us working, and we were using TFS for just its source repository, but now the builds are happening on the TFS server.

What I'm looking for is a way for when TFS does the build for us (it's no longer being done locally on our machine, but by TFS Build Manager) to:

  1. take into account which "publish profile" to use. This will effect what web.config is used and other items you can associate with a profile in your IDE.
  2. once the build is created, to find a way to "push" the build to one of our other servers (QA, Staging, production) FROM TFS.

I don't even know if that is possible or not. Maybe it's still a manual job to take the build created on TFS, and copy it over by hand, and unzip the project/files into the correct file path on the deployed server? Or maybe it's part of the workflow in TFS, and I still have yet to find it.

Was it helpful?

Solution 2

The solution I came up with is I wrote my own build handler for TFS, and use that code to push builds to our different environments. Here is the link I used to help me: http://geekswithblogs.net/jakob/archive/2010/10/27/devleoping-and-debugging-server-side-event-handlers-in-tfs-2010.aspx.

If anyone wants more specifics, just contact me and I'll be glad to help you.

OTHER TIPS

This is surely possible already from TFS. Read the posts from Vishal Joshi on this topic, starting with: http://vishaljoshi.blogspot.com/2011/07/documenting-key-end-to-end-deployment.html

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