On this page:
TeamCity provides several ways to create a new build configuration for a project. You can:
- Create a new build configuration creatingNewBuildConfiguration.
- Create a build configuration template, and then create a build configuration based on the template.
- 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" then click the VCS settings button.
- Create/edit VCS roots and specify VCS-specific settings, then click the Add Build Step button.
- On the New Build Step page, configure the first build step by selecting a desired build runner from the drop-down list, and defining its settings. 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 are not executed.
- Additionally, configure build triggering options, dependencies, properties and variables and agent requirements.
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 on the right side-bar of the page (since TeamCity 8.1 this option is 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 Create from template on the project settings page.
Creating Maven Build Configuration
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:
Configuring settings of a build configuration is described on the following pages: