0
votes

I have a question about the order in which queued builds are processed by TFS 2012. I got some info from the Microsoft site saying that the order in which builds are processed depend on the time that they are queued and their priority.

I have the following situation:

I have one build controller and two agents: - agent 1 with Tag "Build" - agent 1 with Tag "TheRest"

I have two build definitions: - "Build" --> Specified with the "Build" Tag - "Deploy" --> Also specified with the "Build" Tag

I queue 5 builds of the build definition "Build". Immediately after this, I queue a build of definition "Deploy".

The "Deploy" build gets position 6 in the queue, which is correct. But for some reason, the "Deploy" build starts after the first "Build" build is completed.

As these two build definitions have the same Tag and have the same priority, I would think that they would start sequentially in the order that I queue them. But apparently that is not the case.

I'm a missing something here or does somebody has an explanation for this behavior?

Thanks

Kind Regards, Michaël

1

1 Answers

0
votes

I believe the explanation you've been given is correct. TFS attempts to load balance the builds, and has no intrinsic knowledge that one build must precede another, so it simply trundles through the builds you give it as fast as it can.

In a similar situation, I used this method to queue builds in order:

http://blog.stangroome.com/2011/09/06/queue-another-team-build-when-one-team-build-succeeds/