You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

When creating a build configuration, specify the following settings:




The build configuration name

Build Configuration ID

An ID of the build configuration unique across all build configurations and templates in the system.


An optional description for the build configuration.

Build Number Format

This value is assigned to the build number. For more information, refer to the Build Number Format section below.

Build Counter

Specify the counter to be used in the build numbering. Each build increases the build counter by 1. Use the Reset counter link to reset counter value to 1.

Artifact Paths

Patterns to define artifacts of a build. For more information, refer to the Artifact Paths section below.

Build Options

Additional options for this build configuration. For more information, refer to the following sections below:

Table of Contents
excludeExplicit Paths|Paths Patterns


In the Build number format field you can specify a pattern which is resolved and assigned to the build number Build Number on the build start.

Wiki Markup
{note}Maximum build number length after all substitution is 256 characters.{note}
The following substitutions are supported in the pattern:


If you know the names of your build artifacts and their exact paths, you can specify them here.
If you have a build finished on an agent, you can browse use the checkout directory and browser Image Added and select artifacts from a the tree. TeamCity will place the paths to them into the input field.


The Artifact Paths field also supports newline- or comma-delimited patterns of the following format:

Code Block

file_name|directory_name|wildcard [ => target_directory|target_archive ]


  • file_name — to publish the file. The name should be relative to the build checkout directory Build Checkout Directory.
  • directory_name — to publish all the files and subdirectories within the directory specified. The directory name should be a path relative to the build checkout directory Build Checkout Directory. The files will be published preserving the directories structure under the directory specified (the directory itself will not be included).
  • wildcard — to publish files matching Ant-like wildcard pattern (only "*" and "**" wildcards are supported). The wildcard should represent a path relative to the build checkout directory. The files will be published preserving the structure of the directories matched by the wildcard (directories matched by "static" text will not be created). That is, TeamCity will create directories starting from the first occurrence of the wildcard in the pattern.
  • target_directory — the directory in the resulting build's artifacts that will contain the files determined by the left part of the pattern. This path is a relative one with the root being the root of the build artifacts.
  • target_archive — the path to the archive to be created by TeamCity by packing build artifacts determined in the left part of the pattern. TeamCity treats the right part of the pattern as target_archive whenever it ends with a supported archive extension, i.e. .zip, .7z, .jar, .tar.gz, or .tgz.


When the feature is enabled, you need to include the following snippets of code in the web page source:

  • Add this code sample in the <head> section (or alternatively, add the withCss=true parameter to externalStatus.html):

    Code Block
    <style type="text/css">
     @import "<TeamCity_server_URL>/css/status/externalStatus.css";
  • Insert this code sample where you want to display the build configuration status:

    Code Block
    <script type="text/javascript" src="<TeamCity_server_URL>/externalStatus.html?js=1">
  • If you prefer to use plain HTML instead of javascript, omit the js=1 parameter and use iframe instead of the script:

    Code Block
    <iframe src="<TeamCity_server_URL>/externalStatus.html"/>
  • If you want to include default CSS styles without modifying the <head> section, add the withCss=true parameter

To provide up-to-date status information on specific build configurations, use the following parameter in the URL as many times as needed:

Code Block

&buildTypeId=<external build configuration ID>