0
votes

I have a TFS 2010 build service installed with three agents: Database, Production, and Release with mutually exclusive sets of builds running on each.

When builds are queued, unfortunately, they appear to get queued in groups of three regardless of which agent they're ready to go to. This means that we lose the parallelism I was hoping for if more than three builds from a single agent are run at once as they will take up the entire queue.

Is there a way to make sure that builds are queued once their own agent becomes free so that we can have as many parallel builds as possible?

1
"they appear to get queued in groups of three regardless of which agent they're ready to go to. " Groups of 3?? can you explain in detail? I didnt quite catch it.Isaiah4110
Everything gets queued as the continuous build is triggered. Since there are three agents then the builds start three at a time, but if the agent they need is in use, they block waiting for an agent. So, for instance, three release builds and a production build run. All three release builds start but the second two block waiting for the release agent to finish. Meanwhile the production agent is sitting waiting with nothing to do.Damien Ryan
So this is your problem as I understand - if 3 database or Prod or Release builds are queued at a time, it should happen in parallel (using the PROD/Release build agents) rather than waiting for the Database build agent to be free??? My questions: 1. Are you mapping the builds to build agents now, if so how (tags??) ?Isaiah4110
It's more the fact that there are agents that could be used that are sitting free, but queue is taken up by builds waiting on the same agent. I'm using agent names as selection rather than messing about with tags, might that be the problem?Damien Ryan
If you are selecting the build agents directly then the builds waiting in queue is a normal behaviour. So use a build controller and use that for queuing.Isaiah4110

1 Answers

1
votes

Using the TFS 2010 default build defintion you cannot select an build agent but only a build controller unless you have customized it. Ideally you should have a single build controller, which has multiple build agents beneath it. Within the build definition you would only be selecting controller name and the build controller pushes the build to the agent which is free at that point. You can also use TAGS to make sure that the build runs on only a particular build agent.