Configuring Artifacts Storage
The Project Settings | Artifacts Storage tab displays artifact storages configured in this project as well as the storages inherited from parents.
By default, the built-in TeamCity artifacts storage is displayed and marked as active. You can activate a different storage using the corresponding link.
Built-in Artifacts Storage
TeamCity stores artifacts produced by builds on the file system accessible by the TeamCity server. The default location is
<TeamCity Data Directory>/system/artifacts but this location can be redefined.
External Artifacts Storage
TeamCity provides a pluggable API to enable external storage for TeamCity build artifacts. Support for different storages can be implemented as an external plugin to TeamCity: the details are provided in the external storage implementation guide.
Note that when an external storage for artifacts is enabled, the TeamCity internal artifacts (including build logs) will still be published to the TeamCity server and stored in the TeamCity Data Directory in the built-in artifacts' storage.
The same applies to the metadata about artifacts mappings, which will be published to the artifacts directory of the TeamCity Data Directory. When restoring from a backup, make sure they are restored for the external artifact plugin to work properly.
Amazon S3 Support
TeamCity comes bundled with Amazon S3 Artifact Storage plugin which allows storing build artifacts in an Amazon S3 bucket.
It is possible to replace the TeamCity built-in artifacts' storage with AWS S3 at the project level. When S3 artifact storage is configured, it:
allows uploading to, downloading and removing artifacts from S3
handles resolution of artifact dependencies as well as clean-up of artifacts
displays artifacts located externally in the TeamCity web UI
To enable external artifact storage in an AWS S3 bucket:
Navigate to the Project Settings | Artifacts Storage tab. The built-in TeamCity artifacts storage is displayed by default and marked as active.
Click Add new storage. S3 Storage is selected as the storage type (provided there are no other external storage plugins installed).
Provide an optional name for your storage.
Select the AWS environment and provide the required settings.
Provide your AWS Security Credentials.
Specify an existing S3 bucket to store artifacts.
Save your settings.
The configured S3 storage will appear on the Artifacts Storage page. Make it active using the corresponding link.
You can force the virtual host addressing for S3 buckets by enabling the
teamcity.internal.storage.s3.forceVirtualHostAddressing internal property. Currently, both hosted-style and path-style requests are supported by TeamCity. Note that Amazon stopped supporting path-style access for new buckets since September 2020.
With this property enabled, you will be able to select the respective option in S3 Parameters.
Now new artifacts produced by builds of this project with its subprojects and build configurations will be stored in the specified AWS S3 bucket.
When the "Use Pre-Signed URLs for upload" option is enabled, the provided AWS credentials or IAM role on the TeamCity server should have permissions:
DeleteObject, ListAllMyBuckets, GetBucketLocation, GetObject, ListBucket, PutObject.
When the "Use Pre-Signed URLs for upload" option is disabled:
the provided AWS credentials or IAM role on the TeamCity server should have permissions:
DeleteObject, ListAllMyBuckets, GetBucketLocation, GetObject
either AWS credentials should be specified and have
ListBucket, PutObjectpermissions, or IAM role on all the TeamCity agents should have permissions:
Other External Artifact Storage Plugins
Azure Artifact Storage
Azure Artifact Storage is an experimental plugin by JetBrains which allows replacing the TeamCity built-in artifacts' storage by Azure Blob storage.
Google Cloud Artifact Storage
Google Cloud Artifact Storage is implemented as a plugin by JetBrains.