I tried finding the difference between the two but did not find a single point of reference explaining exactly when a template should be used and when a meta-runner should be used. Or are they two tools to do the same task of removing build step redundancy and can be used interchangeably?
My doubt stems from the fact that a meta-runner is used to specify recurring build steps across different build configuration but so can a template be. So when to use which?
This is the closest I found:
While templates can be used to create and maintain build configurations that are very similar, Meta-Runners can be used across build configurations that perform the same build steps. Moreover, a build configuration can only be based on one template, but it can make use of multiple Meta-Runners.
http://www.scmgalaxy.com/scm/build-workflow-management/teamcity/build-configuration-templates-in-teamcity.html
But this does not explain when to use which.
A TeamCity build template is a template for the entire build. It includes configuration that applies to the build as a whole, such as artifact paths, and also collections of VCS roots, build steps, etc., each with their individual configuration. As you said, a build can be associated with only a single build template. You can think of the template as a framework for your build.
A TeamCity meta-runner is a series of build steps (uses of runners) encapsulated as a single runner. It is much smaller in scope than a build template: it only contains the steps and their configuration, not any configuration that applies to the entire build. As you said, a build can use any number of meta-runners. You can think of meta-runners as library calls for your build.
Both constructs are used to consolidate configuration that is repeated across multiple builds. Which one to use depends on how widespread the repetition is. If your builds are all essentially the same except for a setting or a step here or there, make a build template, associate each of your builds with it, and override the template settings where needed. If your builds are all different, but have some common sequences of build steps, make a meta-runner for each common sequence of build steps and use it in the builds which have that sequence of steps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With