Add Continuous Integration Capabilities to Team Foundation Server : Page 3
Continuous Integration is an agile process that rebuilds a project whenever the underlying code changes. Find out how to modify your Team Foundation Server projects' "build types" to implement continuous integration features such as automatic builds, testing, and problem notification.
by Michael S. Jones
Sep 26, 2006
Page 3 of 4
Automating the Build Process
Figure 9. Select Install Location: Select the Team Foundation Server site to use when installing the CI Web service.
Now that you have created and tested a build type, the next step is to configure it to run whenever a developer checks code into the team project. Microsoft supplies a notify.asmx Web service that can automate the team build when a check-in event occurs. You need to download and install the Web service, configure it, and bind the source control check-in event to the Web service.
To begin, download the Web service installation file CI.msi and run it on the server where Team Foundation Server is installed. When prompted for the site to install the Web service to, select "Team Foundation Server" from the list, as shown in Figure 9. When the CI installation completes, navigate to C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web services\CI\ and open the Web.config file. This Web.config file specifies the parameters the Web service will use to build the DevXLibrary project. Modify the config file to include the following <add> element as a child of the appsettings element.
Author's Note: In the preceding code, replace the underlined sections of the string with the appropriate values for your own implementation.
The <add> element shown above specifies values for the server name, team project name, and build type name are specified. The notify.asmx Web service uses these values to run the specified team build.
After configuring the Web service, you can use the utility bissubscribe.exe from a command prompt to bind the check-in event for the DevXLibrary team project to the notify.asmx Web service. You'll find bissubscribe.exe in the C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\ directory. Execute bissubscribe.exe using the command line show below (enter the command on a single line). Replace the underlined portions of the command line below with the name of the server where you run Team Foundation Server.
When bissubscribe runs, the output (shown below) will report a Subscription ID that identifies the subscription that binds the check-in event for the DevXLibrary team project to the notify.asmx Web service.
BisSubscribe - Team Foundation Server BisSubscribe Tool
(C) Copyright 2006 Microsoft Corporation. All rights reserved.
TF50001: Created or found an existing subscription. The subscription ID
Author's Note: Keep track of the subscription ID as you experiment with these subscriptions, because you'll need it later to unsubscribe from the web service.
To unsubscribe from the Web service, execute the following command.