tags:

views:

134

answers:

1

I have a CI process set up in TFS 2008 so that every time a check-in happens a build is triggered but only if a build is not already running. The exact setting used in the configuration is the radio button labeled:

"Accumulate check-ins until the prior build finishes (fewer builds)" The checkbox "Build no more than every _ minutes." is not checked

I have other build processes that might also be going on so I can see that a build is queued with a specific "Date Queued". When the build server gets to the queued build, let's say that it takes 10 minutes to get there, does it use the time-stamp of the queued build to do a get or does the build do a "get latest"?

A: 

I believe TFS will use the changeset of the last triggering commit (i.e. the build does a 'get specific version' by changeset ID, rather than a 'get latest').

You can check this by looking at the build report and finding the value for the 'Source control version' field, you should see something similar to this:

TFS Build Report Fragment, Source control version field

So first off, I would check that the value you're seeing for this is consistent with what you see in the build's workspace and that the build is referencing the expected changeset.

Assuming that your build is working as advertised (and this is a problem for you), then you may want to consider altering this default behaviour and force your CI build do a 'get latest' by overriding the 'GetVersion' MSBuild property in the build's TFSBuild.rsp file, by adding the following:

/p:GetVersion=T

Where 'T' stands for 'tip' (or 'head' in SVN parlance).

JamesD