Build Artifact

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Search

Searching TeamCity 5.x Documentation

Table of Contents

Artifacts are files produced by a build. After finishing a build, TeamCity searches for artifacts in the build's checkout directory according to the specified artifact patterns. Matching files are then uploaded to the server, where they become available for download. Artifacts stay on the server and are available for download until the artifacts for the build are cleaned up. Examples of artifacts are installers, WAR files, reports, log files, etc. Build Configurations can be configured to use artifacts of other builds (refer to Artifact Dependency for details).

Artifacts of a build are specified on the general settings page using comma-, or newline- separated values of the format:

The format contains:

  • file_name — to publish the file. The file name should be relative to the 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. 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 ("*" and "**" wildcards are only 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.
  • target_archivesince TeamCity 5.1: 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, .jar, .tar.gz, or .tgz.

The names can be paths relative to the build checkout directory or absolute paths. The usage of absolute paths is discouraged, please try to use path relative to the build checkout directory.

An optional part starting with => symbols and followed by the target directory name can be used to publish the files into the specified target directory. If target directory is omitted the files are published in the root of the build artifacts. You can use "." (dot) as reference to the build checkout directory.

You can use properties in the artifacts specification. For example, use "mylib-%system.build.number%.zip" to refer to a file with the build number in the name.

Examples:

  • install.zip — publish file named install.zip in the build artifacts
  • dist — publish the content of the dist directory
  • target/*.jar — publish all jar files in the target directory
  • target/**/*.txt => docs — publish all the txt files found in the target directory and its subdirectories. The files will be available in the build artifacts under the docs directory.
  • reports => reports, distrib/idea.zip — publish reports directory as reports and files matching idea*.zip from the distrib directory into the artifacts root.
    TeamCity stores artifacts on disk in a directory structure that can be accessed directly (for example, by configuring the Operating System to share the directory over the network). The artifacts are stored under <TeamCity data directory>/system/artifacts folder. Storage format is described in the TeamCity Data Directory section. Build artifacts are stored on the server "as is" without additional compression, etc.

You can download artifacts of a build via the web UI from the Artifacts column of the build entry on the TeamCity pages that list the builds as well as from the Artifacts tab of the Build Results Home Page.
Artifacts downloading can be automated as described in the Patterns For Accessing Build Artifacts section.

Build artifacts can also be uploaded to the server while the build is still running. To instruct TeamCity to upload the artifacts, build script should be modified to send service messages

Artifacts are stored on the disk on the server, under TeamCity Data Directory/artifacts/<project name>/<build configuration name>/<internal_build_id> directory. The artifacts can be copied directly form the directory on the server (if OS is configured to provide access for it). TeamCity computer's administrator can delete artifacts directly form the disk. In this case, build's artifacts will no longer be available.



See Also:

Labels:

artifact artifact Delete
downnload downnload Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.