views:

342

answers:

6

I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service.

I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not cause a build to trigger despite the option to build every check in being ticked on the build definition. Update: To be clear I had a fully working build definition with the CI option enabled.

The source tree is configured is a pretty straight forward manner with code either under a Main folder or under a Branch\branchName folder. Each branch of code (including main) has a standard Team Build definition relating to the solution file contained within. The only thing that is slightly changed from default settings is that the build server working folder; i.e. for main this is Server:"$\main" Local:"c:\build\main" due to path length.

The only thing I've been able to guess at (possible red herring) is that there might be some oddity with the developer workspaces. Currently each developer maps Server:"$\" to local:"c:\tfs\" so that there is only one workspace for all branches. This is mainly to avoid re-mapping problems that some of the developers had previously gotten themselves into. But I can't see how this would affect CI.

UPDATE: Ifound the answer indirectly; please read below

A: 

If you read my question I clearly state:

"However check ins to the source tree do not cause a build to trigger despite the option to build every check in being ticked on the build definition."

Thanks for the help but this issue is that enabling this option is not working.

Lex
A: 

Select your team project from team explorer, then right click on the Builds folder. Select a new build definition and then select the trigger tab. Move the radio button to "Build each check-in (more builds)"

More info can be found here

MSDN How to: Create a Build Definition

Justin Dearing
A: 

Are there any errors in the log on the TFS application server? Anything that indicates that it tried to fire but failed?

Mr. Kraus
A: 

I've just tried to do a check in now and checked the Windows Event logs and IIS logs for any strange behavior or errors, but can't find anything to show that there is an error of any sort. It's almost as if I haven't checked the build check-in box (but trust me I have).

More frustratingly if I set up an alert on check-ins to source control on that project I do get the alerts; so obviously some sort of event is triggered on check-in; but not builds!

Lex
+4  A: 

Ok I have found the answer myself after several dead ends. In the end I fixed this unintentionally while fixing another issue. Basically we had just turned on the automatic execution of unit tests for our builds. The test would run sucessfully but then immediately the build would bomb out with a message saying it was unable to report to the build drop folder.

What was happening was that while the Build service runs under one account and has a set of rights; some of the functionality is actually driven through the TFSService account. fter wading a heap of permissions I had my tests being reported. Then I noticed that builds had started to trigger on check-ins; I can't tell you exactly which permission fixed this but hopefully this answer will at least set people down the right path.

One other note a few of the builds started failing due to conflicting workspace mappings - this was a separate issue that I resolved by deleting some obsolete workspaces using the Attrice Sidekicks for Team Foundation tool.

Hope this helps somebody else.

Lex
A: 

Thanks for posting your solution. I initially was going to suggest workspace mappings - but the permission issue makes sense.

fuzzbone