Tuesday, July 15, 2008

Hudson now supports Team Foundation Server

Today I released a plugin that adds support for Microsoft's source control manager Team Foundation Server to Hudson (a continuous integration server). The plugin makes it possible to retrieve files and poll the server to detect changes on a project. If Hudson detects a change, a new build can be started automatically. Hudson will also display the changes that occurred in each build.


Configuring the plugin is easy as it is only requires the server URL and the path to the project. Hudson will take care of the rest, such as creating a workspace and work folder to store the files in.


The plugin supports both the command line client in the Team Explorer package from Microsoft and the command line client from Teamprise. An upcoming version of the plugin will add support for the opentf command line client.

So if you wanted to give Hudson a whirl but couldn't use it because you were using TFS, now is the chance to try it out! For more information about this plugin, check out the wiki. There are also several other .NET plugins for MSBuild, NAnt, NUnit, FxCop, StyleCop and compile warnings. I'm currently working on a plugin that integrates CodePlex into Hudson.

Update: The plugin can be downloaded here, or through the update manager in Hudson.

4 comments:

Siarhei Dudzin said...

Nice! I am curious how difficult it would be to create a maven scm plugin? Any idea?

Martin Woodward said...

Awesome work!

redsolo said...

@siarhei - It is not difficult to add new SCMs to Hudson, I wrote a guide while writing the TFS SCM at http://hudson.gotdns.com/wiki/display/HUDSON/Writing+an+SCM+plugin. Check it out, and if you have any questions people are always eager to help on the Hudson user mailing list.

@martin - Thanks alot, and thanks for helping out!

Roy Saberon said...

I was able to configure the TFS plugin and connect to a server. I then did a build and successfully checkout the source codes and the build was fine. But when i try to do a build for the second time an error occcured in Hudson with the following info:



Started by user rsaberon
[workspace] $ "c:\Program Files\Microsoft Visual STudio 9.0\Common7\IDE\TF.exe" workspaces -format:brief -server:http://bai-tfs01.blastasia.local:8080 ********
Server: http://bai-tfs01.blastasia.local:8080
Workspace Owner Computer Comment
---------------------------------- -------- ---------- ------------------------
Hudson-Blast Core Framework-MASTER rsaberon BAI-BLDSRV
FATAL: -1
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(Unknown Source)


It seems that the tfs workspace created by hudson when downloading the source codes was not deleted after the build. I tried deleting the workspace from Visual Studio and ran a successful build from Hudson. But after that it goes to the same error again when i try running another build.

Anything i might have missed.

Thank you.