Jenkins : AWS CodePipeline Plugin

Plugin Information

View AWS CodePipeline on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

AWS CodePipeline is a continuous delivery service for fast and reliable application updates.The AWS CodePipeline plugin for Jenkins provides a pre-build SCM and a post-build (publisher) step for your Jenkins project. It will poll for AWS CodePipeline jobs, and download input artifacts. When a build succeeds, it will compress the build artifacts and upload them to AWS CodePipeline.

Set up

Configure a build server running Jenkins. For your build server, it is recommended to create an Amazon EC2 instance running Jenkins. 

Note: As a best practice, configure an EC2 instance profile rather than using AWS access and secret keys for your server applications. For more information, see https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-four-stage-pipeline.html#tutorials-four-stage-pipeline-prerequisites-jenkins-iam-role.

Configure build project

  1. Install the AWS CodePipeline plugin.
  2. Open your project configuration, or create a new project.
  3. In the Source Code Management section, select AWS CodePipeline.
    1. Fill out the required fields.
  4. In the Build Trigger section, select Poll SCM.
    1. Define a schedule using cron syntax.
  5. Configure your build step as you normally would.
  6. In the Post-build Actions section, add AWS CodePipeline Publisher.
    1. Configure any output artifacts (see below).

AWS CodePipeline Publisher

The publisher can upload zero to five output artifacts.

If you don't need to upload output artifacts, don't add any output locations (but do add AWS CodePipeline Publisher as a Post-build action).

To upload output artifacts, add an output location per artifact:

  • If the location is blank: the whole workspace will be compressed, and uploaded.
  • If the location is a directory: the directory will be compressed, and uploaded.
  • If the location is a normal file: the file will be uploaded as-is (no compression).
Archive format

For blank (workspace) or directory output locations, the plugin will use the same archive format used by the input artifacts. If the input archive type could not be determined, it will default to ZIP.

Supported archive formats:

  • zip
  • tar
  • tar.gz

License

This plugin is licensed under Apache 2.0. See the LICENSE file in the source repository for more information.

Build Status

Changelog

0.39 (Sep 13 2019)

  • (plus) Add eu-north-1 as supported region
  • (info) Update AWS SDK to 1.11.631

0.38 (Jun 27 2018)

  • (error) Update ZIP extraction validation code so that filenames starting with ./ are not blocked

0.37 (Jun 25 2018)

  • (error) SECURITY-967 - Use hudson.util.Secret to store secrets on config.xml
  • (info) Update AWS SDK to 1.11.342

0.36 (Jun 5 2018)

  • (error) Prevent input file from creating files outside work directory
  • (info) Update commons-compress to 1.16.1

0.35 (Mar 14 2018)

  • (error) Fix compatibility issue with Jenkins >= 2.110

0.34 (Feb 21 2018)

  • (plus)   Add eu-west-3 as one of the supported regions
  • (info)   Dependency clean-up to reduce plugin size
  • (info)   Better distribution of parallel requests to aoid throttling issues
  • (info)   Update AWS SDK to 1.11.273

0.33 (Jul 28 2017)

  • (plus)   Add ap-northeast-2 and ap-south-1 as supported regions

0.32 (Jul 13 2017)

  • (plus)   Fix backward incompatible issue of version 0.29

0.31 (Jul 13 2017)

  • (plus)    Fix failed tests on Windows and change LoggingHelper to handle null message.

0.29 (Jul 7 2017)

  • (plus)   Add support to input artifact names for locations in publisher.

0.28 (Jun 30 2017)

  • (plus)   Add us-west-1/eu-west-2/ca-central-1 as supported new regions.

0.27 (Feb 06 2017)

  • (info)   Improve validation error messages.

0.26 (Jan 26 2017)

  • (info)   Increase max supported project name length to 50 characters.

0.23 (Dec 08 2016)

  • (plus)   Add sa-east-1 as one of the supported regions.

0.22 (Dec 01 2016)

  • (plus)  Add eu-central-1 as one of the supported regions.

0.21 (Nov 07 2016)

  • (error) Fix a bug with initializing s3 client with proxy settings.

0.20 (Oct 26 2016)

  • (plus) Add ap-southeast-2 as one of the supported regions.

0.19 (Oct 25 2016)

  • (info)  Updating the Jenkins repository URL.
  • (info)  Upgrade AWS Java SDK to 1.11.44.
  • (plus)  Add us-east-2 as one of the supported regions
  • (plus)  Add ap-southeast-1 as one of the supported regions
  • (error)  Moving acknowledgeJob call to checkout method.

0.17 (Aug 10 2016)

  • (error) Upgrade AWS Java SDK to 1.11.24 (resolves memory leak in version 1.11.3).

0.16 (Jul 21 2016)

  • (plus) Add support for large output artifacts.
  • (plus) Cleanup temporary files after use.
  • (error) Fail AWS CodePipeline jobs when the upload of output artifacts fails.

0.15 (Jul 5 2016)

  • (error) Fix no @DataBoundConstructor issue.
  • (plus) Upload normal files as-is (no compression).
  • (plus) Include plugin version in User-Agent header.

0.14 (Jun 23 2016)

  • (plus) Add support for EU-WEST-1.
  • (info) Upgrade AWS Java SDK to 1.11.3.

0.13 (May 17 2016)

  • (plus) Add jitter to PollForJobs calls to reduce chances of being throttled.
  • (plus) Turn on Jelly's XSS prevention.
  • (error) Fix expired token error for builds that get queued for a while.
  • (error) Fix backslashes getting duplicated when saving job configuration.

0.12 (Mar 25 2016)

  • (info) Update the AWS CodePipeline Publisher schema, to make it easier to use with the Job DSL plugin.

0.11 (Nov 23 2015)

  • (info) Follow symbolic links when compressing outputs.

0.10 (Nov 6 2015)

  • (info) Update the plugin's wiki page link.

0.9 (Nov 5 2015)

  • (info) Prepare plugin to be hosted in Jenkins Update Center.