Continuous Integration using Team Build
You can easily get Team Build setup to perform Continuous Integration - a number one ask from most of the users of Team Build. Here is a sample which kishore and I came up with which helps you to get going with it (for beta3 and beta3R)
Follow these simple steps I followed to setup my CI sample
1. Install the CI.msi
2. In the second page of the wizard when it asks me for Site – I choose ‘Team Foundation Server’, Virtual directory is CI
3. I am done and the CI tool is installed.
4. I go to IIS manager and check if CI has been registered under ‘Web Sites’ ‘Team Foundation Server’
5. Go to the properties of CI and make sure the Application Pool chosen is ‘TFS AppPool’
Now I need to edit the web.config file in the CI tool
6. I go to the local path where CI has been installed – in my case by default it has gone to d:program filesMicrosoft Visual Studio team Foundation ServerwebservicesCI
7. uncomment the following line and add the name of the TFS server, team project name and build type name
<add key="1" value="TeamServer=https://MyMachine:8080;TeamProjectName=AdWorks;BuildType=CI"/>
Finally I need to subscribe to the checkin event notification using bissubscribe
8. subscribe to the notification using Bissubscribe
To do this, use the bissubscribe tool available at “%programfiles%Microsoft Visual Studio 2005 Team Foundation ServerTF SetupBisSubscribe.exe" on the server. The command to use is
Bissubscribe /eventType CheckinEvent /address https://khushboo-dev1:8080/ci/notify.asmx /deliveryType Soap /domain https://khushboo-dev1:8080
Voila! You have CI all set for you, make a quick checkin and see if you get that build triggered off !
Something seems to be wrong still ? - Go through this list to make sure everything is in place
- Did you remember to choose Team Foundation Server while as the site or was it created under the default web site
- Did you remember to choose the TFSAppPool as the Application Pool
- Sometimes after subscribing to the checkin event – iisreset is needed
The sample consists of:
notify.asmx
web.config – the configuration page which contains the properties for continuous integration.
app_code*.cs – the source code for the application.
bin*.dll – the reference assemblies.
Soon you will find a detailed whitepaper on this sample on MSDN - till then have fun with the sample and feel free to let us know what do you think of this.
Comments
- Anonymous
January 05, 2006
Hi,
I have attempted to install your CI example but I have not been able to get it to fire off a build when I check in. I doubled checked all the setting you have specified and they appear correct. Is there anyway to check that the Event has been successfully registered with BisSubscribe? Can you get a list of subscibed events?
Thanks
Anthony - Anonymous
January 05, 2006
Hi Anthony
Unfortunately I dont think there is a way to get a list of all subscribed events. However try these three things to find out the issue
1. Recheck if you have correctly edited the correct web.config file and have the correct team project, tfs and build type name
2. Try resubsribing to the event using the same command as mentioned in the blog and you should get back an id (typically the same one if you had subscribed earlier also).
3. Go to the website created during setup (say CI) and right click on the notify.asmx and browse - does the site come up?
4. Look for the CILogger.txt. We create this log file during the CI process in windowsTeamp directory. If you have this log file - it means that the event was successfully subscribed and there was a problem in the CI process. Do send me the error in the log file and then we can investigate further - Anonymous
January 11, 2006
You can get a list of subscribed events directly from thr database. On the TFS data tier machine try this
use tfsintegration
select * from tbl_subscription
If you have subscribed successfully you should see the entry in this table - Anonymous
January 11, 2006
I've found a bug that occurs when you check code into multiple team projects in the same changeset.
My CILogger.txt reports the following:
Error: ProjectPortfolio: <ProjectA>, <ProjectB> does not exist in Web.Config
Even though I have an entry for <ProjectB> defined. - Anonymous
January 17, 2006
this is an excellent example but obviously it assumes you have one build type per Team Project - Anonymous
January 17, 2006
Thanks Simon for trying out CI and Team Build. Yes you are correct, it supports only one build type in its current shape. But I guess we can change this behavior by tweaking the code a little bit..hmm..something that we will try once we are out of the V1 bug fixing :) - Anonymous
February 01, 2006
hey khushboo, just wondering what the purpose of the userid is that is passed into bissubscribe. also when executing the command i was prompted for another userid and password. i need to know so that i can determine what kind of user to provide, and what priviledges. thanks heaps. ps - really great how streamlined yet effective. - Anonymous
February 05, 2006
Scotty
First of all sorry for this delayed response. Was down sick for a couple of days and hence off emails and blogs:(.
To answer your question - the user id is required to verify that the user has the permission to subscribe/or subscribe others to receive this event.
BTW - just as an FYI this has changed post beta3 - the command no longer requires this user id to be entered and the default user id of the person executing the command will be used
Hope this helps - Anonymous
February 22, 2006
Many of you must have already noted that the CI sample that we had earlier posted here was broken for... - Anonymous
March 09, 2006
Thanks for the update for the RC. I have now setup the example, and are using an LCD-TV to display the status of the build. Looks pretty cool. Check out http://www.hamang.net/index.php?option=com_content&task=view&id=16&Itemid=9
:) - Anonymous
March 15, 2006
I'd like to get continuous integration (CI) working for my TFS server here at the office as my next step.&nbsp;... - Anonymous
May 18, 2006
The continuous integration sample and article from Khushboo Sharan and Kishore M N is now available in... - Anonymous
July 14, 2006
This is a beautiful thing.
Continuous Integration is something more development shops should embrace,... - Anonymous
July 17, 2006
Jeff Atwood at Vertigo Software did some refactoring of the CI sample for TFS that Khushboo developed.&nbsp;... - Anonymous
August 09, 2006
I have setup a CI platform, everything seems ok but how do we configure team foundation server so it can run webtests also? - Anonymous
August 14, 2006
The comment has been removed - Anonymous
September 14, 2006
how are you????? - Anonymous
September 20, 2006
I need your help in one regard. If the team build failed due to recent check-in file then i need to revert back this check-in so that i can have buildable code available in source cocotrol every time. So is there any way to achieve this through programatically or by any other way. - Anonymous
September 20, 2006
I need your help in one regard. If the team build failed due to recent check-in file then i need to revert back this check-in so that i can have buildable code available in source cocotrol every time. So is there any way to achieve this through programatically or by any other way.
My e-mail: amitsharma.mca@gmail.com - Anonymous
September 23, 2006
Team foundation server is a monster. Seriously, it's so big and heavy, that trying to do something as - Anonymous
October 10, 2006
The comment has been removed