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_archive — since 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.
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.
- install.zip — publish file named
install.zip in the build artifacts
- dist — publish the content of the
- target/*.jar — publish all jar files in the
- 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
- reports => reports, distrib/idea.zip — publish reports directory as
reports and files matching
idea*.zip from the
distrib directory into the artifacts root.
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.