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.
Amazon S3 Support
Since TeamCity 2018.1 TeamCity comes bundled with Amazon S3 Artifact Storage plugin which a llows 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 (if any).
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.
Now new artifacts produced by builds of this project with its subprojects and build configurations will be stored in the specified AWS S3 bucket.
Permissions
When "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 "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, PutObject
permissions, or IAM role on all the TeamCity agents should have permissions:ListBucket, PutObject
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.