scottwn / teamcity-softlayer-artifact-storage-plugin

TeamCity plugin which allows replacing the TeamCity built-in artifacts storage with AWS S3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

official project License

TeamCity S3 Artifact Storage Plugin

This plugin allows replacing the TeamCity built-in artifacts storage with AWS S3. The artifacts storage can be changed at the project level. After changing the storage, new artifacts produced by the builds of this project will be published to the (specified) AWS S3 bucket. Besides publishing, the plugin also implements resolving of artifact dependencies and clean-up of build artifacts.

State

Baseline functionality finished. Feedback wanted.

Compatibility

The plugin is compatible with TeamCity 2017.1 and greater

Features

When installed and configured, the plugin:

  • allows uploading artifacts to Amazon S3
  • allows downloading and removing artifacts from Amazon S3
  • handles resolution of artifact dependencies
  • handles clean-up of artifacts
  • displays artifacts located in Amazon S3 in the TeamCity web UI.

Building

Issue the mvn package command from the root project to build your plugin. The resulting <artifactId>.zip package will be placed in the 'target' directory.

Download

Download Compatibility
Download 2017.1.1

Installing

See instructions in TeamCity documentation.

Configuring

The plugin adds the Artifacts Storage tab to the Project Settings page in the TeamCity Web UI. The tab lists the built-in TeamCity artifacts storage displayed by default and marked as active.

To configure Amazon S3 storage for TeamCity artifacts, perform the following:

  1. Select S3 Storage as the storage type.
  2. Provide an optional name for your storage.
  3. Select an AWS region.
  4. Provide your AWS Security Credentials.
  5. Specify an existing S3 bucket to store artifacts.
  6. Save your settings.
  7. The configured S3 storage will appear on the Artifacts storage page. Make it active using the corresponding link.

Now the artifacts of this project, its subprojects, and build configurations will be stored in the configured storage.

Known issues

Bad Request (400) from S3 when downloading artifact from TeamCity in "ant get" task using basic http auth scheme (httpAuth prefix in URL)

Error message returned from AWS: Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified

Workaround: use pure 'curl -L'

Build agents fails to fetch artifacts from S3

Failed to resolve artifact dependency X: Failed to download file 'X': Failed to download https://teamcity/X.tar]: Illegal status [403] while downloading https://s3.X.amazonaws.com/bucket/X?...: Forbidden (jetbrains.buildServer.artifacts.impl.SourcePathAwareResolvingFailedException)

This can occur if the build agent is not able to fetch the artifact from the presigned URL generated by TeamCity within the time limit which is default 60s.

This value can be modified by setting a internal TeamCity server property storage.s3.url.expiration.time.seconds.

About

TeamCity plugin which allows replacing the TeamCity built-in artifacts storage with AWS S3

License:Apache License 2.0


Languages

Language:Java 100.0%