TFS Build Architecture

I am preparing to move my team's source control from VSS over to TFS 2008.

This is for an asp.net website, and I am currently using a combination of nant scripts and Cruise Control to do all of the builds and deployments.

I've been trying to wrap my head around the best way to architect TFS build to do the same thing I'm doing with NANT and Cruise Control, but I can't determine the best approach.

Here are my requirements:

  1. When code reaches a certain point, I manually apply a label to it.
  2. This labeled code needs to be built and deployed to any of our 25 different Dev, QA, or production environments.
  3. Any of these 25 environments can be on any current or past labeled version of the application.
  4. I need to be able to deploy any labeled version of the application to any of the environments.

I'm currently accomplishing the above using NANT to perform the build, and using Cruise Control to just pass in command line options for which environment(s) to build and deploy. I have a Nant config file with a list of all of my environments, and an associated label each environment should currently be using. This file gets manually updated whenever a new label is created.

I know the approach I'm using for NANT probably won't be the same as with Team Build, but has anyone done something similar with Team Build and could share how you accomplished it?

-------------Problems Reply------------

  1. Labeling in TFS is much more robust than in VSS. When you create a label, you can create based on a changeset, date, workspace version, heck even a different label. (BTW, I was grabbing a link and came across this post that you might find relevant.)
  2. By default, a Team Build will build from the latest version of code in source, but you can override the "CoreGet" target in a build to build a specific version. Aaron Hallberg (a.k.a. TFS's John Skeet) shows an example here.
  3. see 4.
  4. I haven't personally had this difficult of a requirement, but I've done something similar. When you queue the build, you can pass in any number of parameters in a couple important ways, 1) through the response file and 2) at queue time (simple example here). In either case, two parameters could be which environment and which label/version number. At my current project, I have continuous integration turned on, so when code in a workspace is checked in, the current code is automatically labeled, pull the specifics for my drop location from the response file, then deploy to the respective location.

Given the fact that you have ~25 environments and n number of versions/labels, you could build a simple GUI that reads the current labels through the TFS API and lets you pick which version to build to a particular environment.

To answer the question, the way I addressed this was to use a combination of a custom build task, cruise control, and msbuild.

The custom build task allowed me to get the latest version from a specific branch and label.

Cruise control allowed me to pass in specific information for a specific build to MSbuild, using a config file, but initiate the build from a UI.

msbuild was used like normal, however it was called from cruise control, and the custom build task did most of the work.

Category:tfs Views:0 Time:2009-07-10

Related post

  • One click deployment using TFS Build 2010 2011-11-22

    Let me start with my website architecture I have 2 web servers (staff), 2 web servers (external user), 2 App Servers (wcf) and database server. I have more then 5 environments (which will have there corresponding configuration). Using Team Build 2010

  • Whats the best way to deliver TFS build status notifications to the team? 2008-09-01

    I like the status email sent by TFS's alerts mechanism when a build breaks. However I would like to send such an email to the entire team and not rely on the team to subscribe to the alert... Having a hard time producing a nice and detailed enough me

  • TFS Build Server drop location error 2008-09-26

    We're using TFS Build Server to ensure that all files checked in by developers are going to compile to a working source tree, cuz there's nothing worse than a broken build! Anyway we've having some problems with the drop location that Build Server wa

  • MS Access Project In TFS Build 2008-12-19

    I have a question for all of you and please any ideas are welcome. We have alot of MSAccess database projects in our repository on which developers work and do there tests in Dev Envoirment on there own. As you all know compiling a databse project is

  • When running a TFS build, will it always download all the files for the project? 2009-02-09

    When running a TFS build, will it always download all the files for the project, or can it use a previous builds download (as long as the files didn't change). --------------Solutions------------- TFS build (2008) will always get all sources specifie

  • How to send a custom email containing TFS Build status 2009-02-13

    I'd like to send a custom build status email during or after the TFS build, but it doesn't look like the actual compilation status, etc. is known until after the entire process ends. Does anyone know of a way to send a custom email (other than the bu

  • Changing the location of the TFS Build 2009-03-24

    I have a TFS Build Server where the CI and Release builds occur. The build process runs under some domain account and all the build activity happens under this user's temp directory. Unfortunately, the \Users directory is on the C: drive which turns

  • ASP.NET MVC 1.0 AfterBuilding Views fails on TFS Build 2009-04-16

    I've upgraded from ASP.NET MVC Beta to 1.0 and did the following changes to the MVC project (as descibed in the RC release notes): <Project ...> ... <MvcBuildViews>true</MvcBuildViews> ... <Target Name="AfterBuild" Condition="'$(

  • Problems building VS database project on TFS build server 2009-04-17

    I have two Visual Studio database projects. Both build fine on my local dev environment. On the TFS build server, with a TFS build solution containing both projcets, one builds fine and the other fails with this error: Task "SqlBuildTask" Creating a

  • Update TFS Build Quality when unit tests pass 2009-05-16

    Im trying to update the build quality of a build when the unit tests pass.. I figured how to update the quality of the build using a statement like this... <Target Name="AfterEndToEndIteration"> <SetBuildProperties TeamFoundationServerUrl="$

  • TFS Build Agent not responding 2009-05-27

    I came across an issue I can't resolve, here are the details: I am using TFS2008 in my APPTier and in my Build Agent. Initially I installed everything in the Apptier server (including the build agent), and I was able to start an build in the Apptier(

  • TFS Build: Fails to run tests 2009-07-03

    I am trying to setup a TFS Build, and am having trouble getting my tests to run as a part of the build. I am getting the following weird error message in the build log: D:\TeamBuild\main-production\Company-Test DEV\Sources\root\main-production\custom

  • SDLC Mangement for TFS Build Scripts 2009-07-09

    I'm in the process of developing several custom build scripts for TFS and I'd like to know if there are any best practices for developing, testing and deploying TFS build scripts. Do you setup development and QC environments that are seperate from th

  • How to chain TFS builds? 2009-07-24

    I have a scenario where I want to call one TFS build from another, the first one does the build and the second one does staging. This will allow me do multiple custom staging for the same solution. I know, I can pull this off with an exec task in the

  • Command line argument to Delete all the TFS builds? 2009-08-13

    I'm using the Build Explorer to delete our project's builds. It's taking forever because it's 'timing out' trying to delete the label and drop location (now that the drop location doesn't exist any more). So, I'm hoping to do this via the command lin

  • How do I use TFS Build 2008 and my Web Deployment Project? 2009-08-14

    I wish to create a TFS Build for my solution. Is there anyway I can just make the TFS Build, build my WDP only .. and not everything in the solution, etc? Secondly, is there a special keyword I can use to tell my WDP that when it's a TFSBuild, it set

  • How to get a property from a task in a TFS build? 2009-09-03

    I made a custom task in my TFS build to examine my project's GlobalAssemblyInfo.cs file in order to extract an attribute (AssemblyInformationalVersion to be exact) in order to use its value in naming a zip file that I make with the build. <UsingTa

  • Fail TFS Build on Single Unit Test Failure 2009-09-16

    Setting up CI within Microsoft Team Foundation Server, I have a build that will build the solution and execute all of the unit tests within the solution. Currently the build will show as partially succeded if the build is successful and an of the uni

  • MSBuild TFS Build Number 2009-10-08

    I have been using SVN for a little while now. recently on a project I am using TFS. With the builds I like to append/update the build version number on the project output. I do this on the masterpage so that it is clearly visible on the application.

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.155 (s). 11 q(s)