Trialing TeamCity; correct way to build all configurations in a project?

Is the “correct” way to do this to create a “Build All” configuration that does nothing and then have all the actual build configurations have an additional finish trigger on the “Build All” configuration?

I saw this suggested on Stack Overflow and it works, but I just wondered if there was a “native” method to achieve this that I have so far missed.

Partially correct, yes. A "build all" configuration is the most sensible solution if your scenario is the requirement, but rather than finish build triggers, you can create it of type "composite", which is a special type of configuration that doesn't use agents and doesn't run any build steps, it just aggregates the results of its dependencies, and then attach snapshot dependencies to all of them. 

Build all having a snapshot dependency on builds A, B and C makes it so automatically, whenever you trigger Build All, an instance of A, B and C will be also triggered added to the queue, and they will be required for "All" to finish. With normal build configurations, snapshot dependencies would make Build All wait until A, B and C are finished before All even starts. With composite builds, since they don't have content of their own, it will show the progress of its dependencies. You can configure the snapshot dependency to reuse builds in case they don't need to run but the last one is already suitable (there are no pending changes, no new parameters, no new dependencies, etc), you can add artifact dependencies to each one specifically, and you can use some of the features that come with build chains, while finish build triggers don't add any of those possibilities, and will always wait for the first build to finish to be triggered. There are some use cases for that, but for your description, snapshot dependencies seem better suited to the task.

Brilliant thanks for that, that seems better. At the moment, my build-all finishes immediately, which then triggers the actual build, so while it works it's not perfect as it shows the build-all as having completed/successfully when all that has happened is the actual individual builds have started


Please sign in to leave a comment.