A Kinder, Gentler Continuous Integration service for Team Foundation Server

In an earlier post, I documented how to set up Microsoft's unofficial Continuous Integration solution for Team System.

I was a little.. perplexed.. by the code inside that web service. I took some time to refactor it and polish it up into something I personally found much simpler and easier to understand. For example, I added proper XML comments throughout, and made the log file more visible and timestamped.

It's still 99% the product of Khushboo's hard work, don't get me wrong, but this is a kinder, gentler version of the Continuous Integration web service you could deploy to your Team Foundation Server with the confidence that you could easily modify it if you needed to.

Here's how to set it up:

  1. Download the code
  2. Unzip to C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\CI
  3. Make that folder an application in IIS, and put it in the TFS AppPool IIS application pool (this is required!)
  4. Set up a subscription for the CheckInEvent to this web service using the bissubscribe.exe tool:
    C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\bissubscribe.exe
      /eventType CheckinEvent 
      /address http://tsweb/ci/notify.asmx 
      /domain http://tsweb 
    
  5. Modify the web.config settings to taste. The relevant settings are..

    <add key="LogFileName" value="CI-log.txt"/>
    <
    add key="TeamFoundationServer" value="http://tsweb"/>
    <
    add key="1" value="TeamProjectName=Demo;BuildType=CI"/>

And that's it! It's almost.. easy. All this stuff is documented directly in the source, too, so you can just ignore me entirely and have at it with a good chance of "falling into the pit of success".

If you get into trouble, Check the log file at c:\windows\temp\CI-log.txt for troubleshooting, and always be sure you can navigate to the web service HTML page in your browser without an error before troubleshooting anything else.

Updated 8/01: I added Daniel Cazzulino's excellent default.aspx page for selecting projects and builds to the zip file -- no more manually editing web.config!

posted on Friday, July 14, 2006 3:37 PM by jatwood

Comments

# Continuous Integration Sample Refactored

Jeff Atwood of Vertigo Software took the trouble to refactor the continuous integration sample for Team...
Friday, July 14, 2006 6:42 PM by Rob Caron

# Continuous Integration on Team Foundation Server

This is a beautiful thing.
Continuous Integration is something more development shops should embrace,...
Friday, July 14, 2006 9:55 PM by Patrick Altman

# Continuous Integration with Team Foundation Server

Jeff Atwood at Vertigo Software did some refactoring of the CI sample for TFS that Khushboo developed.&amp;nbsp;...
Monday, July 17, 2006 7:03 AM by Corporate Coder

# re: A Kinder, Gentler Continuous Integration service for Team Foundation Server

Works great Jeff. This makes integrating CI an easy first step for TFS users. Now to make sure your dev group embraces CI ...
Monday, July 17, 2006 7:06 AM by Eric Landes

# VSTS Links - 07/17/2006

Dave McKinstry on hints for expediting Team Build script deployment.

Roy Osherove on using Source...
Monday, July 17, 2006 11:22 AM by Team System News

# Use the Dell XPS LEDs to Monitor Your Build Status

Nearly two years ago, while I was still working for Microsoft Consulting Services in the field, I posted...
Sunday, July 23, 2006 11:41 AM by Michael Swanson's Blog

# I need a new laptop.

Check this out&amp;nbsp;-&amp;nbsp;Scott Quibell and Rob Cecil figured out how to&amp;nbsp;make the LED lights on...

# Use the Dell XPS LEDs to Monitor Your Build Status

Nearly two years ago, while I was still working for Microsoft Consulting Services in the field, I posted...
Monday, July 24, 2006 9:56 AM by Michael Swanson's Blog

# I need a new laptop.

Check this out&amp;nbsp;-&amp;nbsp;Scott Quibell and Rob Cecil figured out how to&amp;nbsp;make the LED lights on...
Monday, July 24, 2006 11:43 AM by Brian Keller: Technical Evangelist for Team System

# How to setup continous integration with team foundation build

Note: this entry has moved.First, I followed the instructions and used the code from the Vertigo Software
Wednesday, July 26, 2006 10:33 AM by Community Blogs

# Continuous Integration with Team Build

Jeff Atwood started out with the continuous integration with MSDN CI sample&amp;nbsp;for Team Build.&amp;nbsp;...
Wednesday, August 09, 2006 7:02 PM by Buck Hodges

# Catching up on Team System Blogs

After traveling most of June, and then some in July it&amp;rsquo;s been hard catching back up but almost...
Sunday, August 13, 2006 6:14 PM by MrDave's (David Yack) Blog!

# Small bug in notify.cs

FYI - there is a bug in the notify.cs file when you call the service with a name that's not defined in the config. A reference to proj.Name causes a NullReferenceException (because the proj variable is null).

Simply change line 48 to read:

Logger.Log("Team Project does not exist in Web.config");
Thursday, September 07, 2006 1:04 PM by Tim Dallmann

# Continuous Integration with Team Foundation Server

Monday, September 11, 2006 8:04 PM by Javier G. Lozano

# Continuous Integration with Team Foundation Server

Thursday, September 14, 2006 8:10 PM by Javier G. Lozano

# Integraci&#243;n continua con Team System

Cuando me lleg&amp;oacute; este libro sobre Team Foundation Server, me fui directo al cap&amp;iacute;tulo sobre
Thursday, February 15, 2007 12:56 AM by .NET a 2.860 m de altura

# TeamBuild Plug-in for CruiseControl.NET

I&amp;#39;ve been meaning to write this post for a couple of months now as a follow-up to a session that
Wednesday, May 23, 2007 5:05 PM by James Dawson's Blog

# re: A Kinder, Gentler Continuous Integration service for Team Foundation Server

i am facing some problem TFS is not calling the web method can any one please tell me the possible cause?

urmil.shah@nsldirect.com
Thursday, June 07, 2007 3:45 PM by Urmil

# Using CruiseControl.NET to trigger TFS 2005 builds for continuous integration

I ran across the following post by James Dawson and thought it may be of interest to folks trying to
Tuesday, August 07, 2007 11:47 AM by Buck Hodges

# Continuous Integration resources for Team Build

This post was originally published here . Team Build 2005 did not support Continuous Integration out
Thursday, March 27, 2008 2:46 PM by GrabBag<T>