Child pages
  • AWS CodeDeploy Runner
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

General Info

Author

Victory Petrenko

License

Apache 2.0

Type

free, open-source

StatusBeta

Download

Last nightly build on public TeamCity server.

 

Plugin Description

The plugin automates all subtasks of the deployment. It adds a TeamCity build step with flexible settings supporting TeamCity parameter references and performs the following tasks:

  • Prepares and uploads an application revision to AWS S3
  • Registers the application revision in a CodeDeploy application
  • Creates a CodeDeploy deployment and optionally waits for its finish

All of the above tasks are accompanied by TeamCity progress and error reporting.

TeamCity Versions Compatibility

The plugin is compatible with TeamCity 9.1 and newer.

Installation instructions

Download aws-codedeploy-plugin.zip and install the plugin on the TeamCity server. 

Prerequisites

To use the plugin, you need to have correctly pre-configured AWS resources including:

  • The IAM user or a role with sufficient permissions for TeamCity to access AWS services
  • An existing S3 bucket for uploading the application revision 
  • A CodeDeploy application with specially tagged target instances (deployment group) which must be running when the deployment starts.

Please note that CodeDeploy application and S3 bucket as well as target EC2 instances must be in the same region. For more information on configuring a CodeDeploy application and required resources, see CodeDeploy documentation.

You may be charged money for using the above mentioned resources.

Security settings

The currently supported credential types are AWS account access keys (access key ID and secret access key) or temporary access keys received from AWS security token service by assuming a role.

For the both types CodeDeploy runner can use default credential provider chain.

Application revision

A CodeDeploy deployment object, application revision is an archive (zip, tar or tar.gz) containing application source files accompanied by an application specification file appspec.yml. The archive is uploaded to an AWS S3 bucket and registered as an application revision in a CodeDeploy application.

To configure the application revision in the AWS CodeDeploy Runner, you need to specify either a path to a ready-made application revision archive (containing appspec.yml) or a set of build checkout directory-relative paths to application files which will be packaged into a zip archive. Ant-style wildcards ant target folders like dir/**/*.html => dist/pages are supported.

To provide a custom appspec.yml file (which will replace the existing appspec.yml if there is one in the build checkout directory) for deployments created by AWS CodeDeloy Runner, you may specify the codedeploy.custom.appspec.yml configuration parameter containing valid appspec.yml content or a path to a custom appspec.yml.

In most cases one needs to register and/or deploy the latest application revision from S3 bucket, but if you are using a versioned S3 bucket you may address a particular S3 object version by adding the codedeploy.revision.s3.version configuration parameter.

Deployment id config parameter

For each created deployment, the codedeploy.deployment.id configuration parameter is reported. The parameter is available in the following build steps and in the dependent builds as %dep.*% properties.

Public repository: https://github.com/JetBrains/teamcity-aws-codedeploy-plugin.

Feedback

The plugin is in active development. Everybody is encouraged to try the plugin and provide feedback in the forum or post bugs into the issue tracker.

Original issue in the tracker.

  • No labels