Build artifacts are files produced by a build. Typically these include distribution packages, WAR files, reports, log files, etc. When creating a build configuration, you specify the paths to the artifacts of your build on the General Settings page.
Upon the build finish, TeamCity searches for artifacts in the build checkout directory according to the specified artifact path or path patterns. The matching files are then uploaded ("published") to the TeamCity server, where they become available for download through the web UI or can be used in other builds using artifact dependencies.
To download artifacts of a build, use the artifacts icon available on the project or build configuration overview page and on the TeamCity pages that list the builds, or see at the Artifacts tab of the build results page. Browsing artifacts inside archives is supported.
You can automate artifacts downloading as described in the Patterns For Accessing Build Artifacts section.
In case of the built-in storage, TeamCity keeps artifacts on the 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 storage format is described in the Artifacts in the TeamCity Data Directory section. The artifacts are stored on the server "as is" without additional compression, etc. By default, the artifacts are stored under the
<TeamCity data directory>/system/artifacts directory which can be changed.
You can configure an external artifacts storage to replace the built-in one.
Build artifacts can also be uploaded to the server while the build is still running. To instruct TeamCity to upload the artifacts, the build script should be modified to send service messages.
In addition to user-defined artifacts, TeamCity also generates and publishes some artifacts for internal purposes. These are called hidden artifacts.
For example, for Maven builds, TeamCity creates the
maven-build-info.xml file that contains Maven-specific data collected during the build. The content of the file is then used to visualize the Maven data on the Maven Build Info tab in the build results.
- Hidden artifacts are placed under the
.teamcitydirectory in the root of the build artifacts.
- Hidden artifacts are not listed on the Artifacts tab of the build results by default. However, below the list of the artifacts there's a link that allows you to view hidden artifacts if any. When hidden artifacts are displayed, clicking the Download all link will result in downloading all artifacts including hidden ones.
- Artifacts dependencies do not download hidden artifacts unless they explicitly have "
.teamcity" in the pattern.
- Hidden artifacts are not deleted by artifacts clean-up unless ".
teamcity" is explicitly specified in the pattern.
You can configure publishing some builds artifacts under .teamcity directory to make them hidden.
Some of the hidden artifacts are:
maven-build-info.xml.gz- Maven build data. Used to display data on Maven Build Info build's tab.
propertiesdirectory - holds properties calculated for the build on the agent. There are properties actual before the build and after the build. These are displayed on the build Properties tab.
.NETCoverage- raw .Net coverage data (e.g. used to open dotCover data in VS addin)
coverage_idea- raw IntelliJ IDEA coverage data (e.g. used to open coverage in IDEA)
Artifacts Cache on Agent
All artifacts published by a build are stored in the agent's artifacts cache in the
<Build Agent home>\system\.artifacts_cache directory, which helps speed up artifact dependencies in some cases. However, depending on the size of artifacts, clean-up and other settings, artifacts caching may cause low disk space on the agent. You can configure storing published artifacts in the agent cache.