The current meta-runner usages can be seen at the project Meta-Runners tab: Once the meta-runner is extracted, it becomes available in the build runners selector and can be used in any build step just like any other build runner: Requirements can be useful if the tools used by meta-runner are available on specific platforms only. Upon clicking the Extract button, TeamCity will take definitions of all build steps and parameters in this build configuration and create a build runner out of them.īesides build steps and parameters, a meta-runner can also have requirements: if requirements are defined in the build configuration, they will be extracted to the meta-runner automatically. We also need to provide the name, description and an ID for the meta-runner: the name and description will be shown in the web interface, an ID is required to distinguish this meta-runner from others. In our case the is selected, so the meta-runner will be available in all projects. A meta-runner created in a project will be available in this project and all its subprojects. The Extract Meta-Runner dialog requires specifying the project where the meta-runner will be created. If the build configuration works properly, we can create a meta-runner using the Extract Meta-Runner button in the build configuration settings sidebar: Once the build steps and parameters are defined, we need to make sure our build configuration works by running a couple of builds through the custom build dialog: Verifying Build Configuration Works Properly When you extract a meta-runner from this build configuration, all the settings defined in the build step, and all the build parameters will be added to the meta-runner. Net process, etc.) and configure the settings, define the parameters for this build step. In the initial build configuration, you can use any of the available build runners (e.g. Here the Ant build step is used just as an example. Now this specification is used by a meta-runner too. Before version 8.0 this specification was used by the custom build dialog only. Note that each parameter can have a specification where we can provide the label, description, type of control and specify validation conditions. We need to add it on the Build Parameters tab of the build configuration settings: Where artifact.paths is a system property. So in our case the Ant step settings will look like this: This is important because our build configuration must be self-contained, it cannot take build.xml from the version control repository. Let us use the configuration with a single Ant build step: Ant can be executed on any platform where the TeamCity agent runs besides, Ant runner in TeamCity supports build.xml specified right in the runner settings. The first step is to prepare a build configuration which will work the same way as the meta-runner we would like to produce. In this example, we will create a runner which can be inserted between any build steps and can be configured to publish artifacts produced by previous steps. However, sometimes for long builds with multiple build steps we need artifacts faster. Usually artifacts configured in a build configuration are published when the build finishes. In this example, we will create a meta-runner to publish some artifacts to TeamCity with the help of corresponding Build Script Interaction with TeamCity. Verifying-Build-Configuration-Works-Properly, To create a meta-runner, follow these steps (described below in more detail): More examples of meta-runners are available on GitHub: see Meta-runner Power Pack for TeamCity 8. Let us consider an example of creating a meta-runner. If a meta-runner is stored on the level, it is available globally (in all projects). publish to FTP, delete directory, etc.), you can simplify your build configuration and decrease a number of build steps.Īll meta-runners are stored on a project level, so they are available within this project and its subprojects only, and are not visible outside. With a meta-runner, you can easily reuse existing runners, create new runners for typical tasks (e.g. TeamCity allows extracting meta-runners using the web UI. This build runner can then be used as any other build runner in a build step of any other build configuration or template.īasically, a meta-runner is a set of build steps from one build configuration that you can reuse in another it is an xml definition containing build steps, requirements and parameters that you can utilize in xml definitions of other build configurations. A Meta-Runner allows you to extract build steps, requirements and parameters from a build configuration and create a Build Runner out of them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |