If you want to apply certain settings for all build configurations in the project so that other users cannot redefine them, TeamCity provides this option for all build configurations in a project hierarchy. For example, with forced settings, you can set agent-side checkout anywhere or ensure that all build configurations have a strict turnaround time. Currently, it is possible to apply functions, options and generation settings. Build steps and build requests can also be applied. Under Build steps, click Automatically detect build steps, and then select the suggested steps that you want to add to the current build configuration. You can change your settings later. Build settings and environment information are available on the Build Results Settings tab. Starting with TeamCity 2020.1, you can also add granular runtime conditions for build steps. The build step is considered failed if (1) the build process returned a nonzero exit code and (2) the build error condition “Build failed if the build process exit code is not null” is enabled (see Build failure conditions); Otherwise, the build step is considered successful. Build configuration templates support the project hierarchy: once created, templates for the current project and its parent templates are available. When you copy a project or build configuration, templates that do not belong to the target project or to one of its parents are automatically copied. You can associate a build configuration with a template only if the template belongs to the current project or one of its parent projects.
Then we can configure the project and run a build in TeamCity. Also configure build trigger options, dependencies, properties and variables, and agent requirements. You can redefine almost any build configuration settings (for example, build steps, settings, build options). The only exceptions are snapshot dependencies and pull rules, which cannot be redefined. TeamCity starts the build and you can view the build progress by clicking Build Configuration Home Page. Once the build is complete, you can view the build results by clicking the Build number: Modifying the build source code with a custom fix link allows you to run a custom build based on a user`s local sources that have not yet been passed to the repository. For snapshot dependencies, TeamCity runs all dependent builds on the sources created at the time of the build on which they depend. Otherwise, the link to the build analysis for the specified build is available in the build log: when a build configuration is separated from some of its templates, any actual settings inherited from those templates (which are not overwritten in the configuration and are not overlaid by a higher priority model) are included in the configuration. Copying the build configuration logic is equivalent to checking out a model. When moving a configuration/build project, the logic checks all templates to which the build configuration is attached. You can rearrange the build steps as needed. Note that you cannot reorder inherited build steps if you inherited a build configuration from a template.
However, you can insert custom (non-inherited) build steps anywhere and in any order, including before or between legacy build steps. Inherited build steps can only be rearranged in the original model. Changing the parameters in the model affects all configurations associated with that model. However, it is possible to redefine most of the settings in an associated build configuration. We have identified three cases where multiple build configurations are essential: A build configuration is a set of parameters used to start a build and group the order of builds in the user interface. Examples of build configurations are distribution, integration testing, preparing for release releases, “night” construction. A build configuration belongs to a project and contains builds. You can explore the details of a build configuration on its home page and edit its settings on the Settings page.
DSL: Kotlin DSL is extended so that users of a build configuration definition can use the templates(vararg) method, which accepts external IDs or DSL template instances (but not a mixture of these, so if both templates defined inside and outside DSL are used in the same configuration, external IDs of both must be used). The old model(…) The method and property cannot be used multiple times in the same build type definition to indicate that they are inherited from multiple templates: after a previous implementation, this method overrides the previous external template ID each time it is used.