grenade
grenade

Reputation: 32179

Queue rather than run a TeamCity build while another build is running

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?

Upvotes: 4

Views: 1072

Answers (2)

Pedro Pombeiro
Pedro Pombeiro

Reputation: 1652

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.

Upvotes: 4

Eugen Martynov
Eugen Martynov

Reputation: 20130

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.

Upvotes: 0

Related Questions