TeamCity provides several ways to create a new build configuration for a project. You can:
- Create a new build configuration manually
- Create a new build configuration from URL (since TeamCity 9.1)
- Create a build configuration template, and then create a build configuration based on the template.
- Deprecated since TeamCity 8.1 Create a Maven build configuration by importing settings from
Creating New Build Configuration
- On the Administration > Projects page, select the desired project in the list. (Alternatively, select the project from the Projects popup, and click the Edit Project Settings link on the right). On the project settings page, click Create build configuration.
- Specify general settings for the build configuration, click Create.
- Proceed with creating other settings:
- Create/edit VCS roots and specify VCS-specific settings
- On the Build Steps page, configure build steps either manually by selecting a desired build runner from the drop-down list, or using the automatic detection. More information . Click Save. You can add as many build steps as you need within one build configuration. Note, that they will be executed sequentially. In the end, the build gets the merged status and the output goes into the same build log. If some step fails, the rest is executed or not depending on their step execution policy.
- Additionally, configure build triggering options, dependencies, properties and variables and agent requirements.
Creating New Build Configuration from URL
Since TeamCity 9.1, you can create a build configuration using a VCS URL:
- On the project settings page, click Create build configuration from URL.
- Specify settings for the build configuration, click Create.
Creating Build Configuration Template
Creating a build configuration template is similar to creating a new configuration. On the Project settings page, click the Create template button and proceed with configuring general settings, VCS settings and build steps.
Alternatively, you can create a build configuration template from an existing build configuration using the Extract Template option from the Actions menu at the top right corner of the screen.
Creating Build Configuration From Template
To create a build configuration based on a template:
- On the Project settings page locate the desired template and click its name or use Edit.
- Click the Create Build Configuration button available from the Actions button at top right corner of the screen.
- Specify a name for the new configuration.
- The settings set up in the template cannot be edited in a configuration created from this template. However, some of the can be redefined in a build configuration. Note that modifying the settings of the template itself will affect all configurations based on this template.
Alternatively, you can create a build configuration based on a template by clicking Create build configuration and selecting a template from the Based on template drop-down on the configuration settings page.
Creating Maven Build Configuration (Depricated)
To create a new build configuration automatically from the
POM.xml file, on the Project settings page click Create Maven build configuration.
Specify the following options:
Specify the POM file to load configuration data from. You can either provide an URL to the
Username to access the VCS repository.
Password to access the VCS repository.
Provide goals for the Maven build runner to be executed with the new configuration.
Select the check box to set automatic build triggering on snapshot dependency.
When a new Maven configuration is created, any further configuring is similar to editing an ordinary build configuration.
Refer to Maven documentation on the SCM Implementation for the following supported version control systems:
- Subversion: http://maven.apache.org/scm/subversion.html
- Perforce: http://maven.apache.org/scm/perforce.html
- StarTeam: http://maven.apache.org/scm/starteam.html
Maven SCM URL Format
The general format for a SCM Url is
As a delimiter, use either a colon ':' or, if you use a colon for one of the variables (for example, a windows path), you can use a pipe '|'.
For more information, refer to the official Maven SCM documentation page.
In TeamCity you can use simplified SCM URL format:
- If the protocol defined in the provider-specific part unambiguously identifies the SCM-provider, then the
scm:<scm_provider>:prefix of the URL can be omitted. For instance, the "
scm:starteam:starteam://host.com/trunk/pom.xml" URL will be valid in the "
starteam://host.com/trunk/pom.xml" format. In any other case, for example if HTTP protocol is used for SVN repository, then the SCM-provider must be specified explicitly:
scmprefix can be omitted, or can be replaced with
Examples of the SCM URL for Supported SCM Providers
The following URLs will be considered equal:
Ordering Build Configurations
You can view all build configurations of a project on the Project Overview page listed in alphabetical order by default. Starting from TeamCity 9.1, administrators can customize the default order.
Configuring settings of a build configuration is described on the following pages: