4
votes

Our busy enterprise server has 550 active build configurations running on 30 agents. We need a way to prevent some builds from running while other builds are running. I already understand artefact dependencies and this does not solve our problem as the builds do not depend on each other they just share some resources like server port numbers and database connections. Some build configurations conflict with each other when run simultaneously and we need to prevent this by having a way to queue a build (rather than run it) when one of a number of other builds are running.

We already use dumb tricks like restricting builds to specific agents, etc... I'm thinking about adding a first build step that checks for a flag in a db table or something but this would add lots of failed builds when what we really need is proper build queueing.

Am I missing something? Does this functionality already exist in TeamCity?

2
Since your dependencies that you need to serialize are external from the actual build (sounds like some sort of deploy step), it makes sense to me that you'd have an external solution. Can your builds afford to stall themselves and synchronize on a third-party resource? Maybe you can build your own queue solution (e.g. a small web application) that the appropriate build steps block on? That way the actual build steps can go in parallel and only the parts that need to be serialized are serialized.Merlyn Morgan-Graham

2 Answers

4
votes

It looks like what you need is on its way in the form of TeamCity 8 Shared Resources. You can already get access to the EAP here.

0
votes

My huge respect for 550 configurations and 30 agents.

I think you already found the solution:

  1. Have one environment per agent
  2. Assign configuration for specific agents

I could imagine how much it is work. But I think it's much cleaner and will work much faster than restriction to run several configurations at the same time.