buildkite/aws-codepipeline-buildkite-custom-action-type

Name: aws-codepipeline-buildkite-custom-action-type

Owner: Buildkite

Description: Integrating AWS CodePipeline with Buildkite

Created: 2015-11-04 01:37:09.0

Updated: 2016-11-29 09:25:16.0

Pushed: 2015-11-04 14:33:11.0

Homepage: https://buildkite.com/

Size: 152

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Using AWS CodePipeline with Buildkite

AWS CodePipeline integration for Buildkite that allows you to trigger Buildkite builds from within your CodePipeline pipelines. It consists of:

Requirements
Setup
1. Create your project on Buildkite

Create your project and steps as you normally would, but you don't need to a valid git repository URL as the source code will be downloaded via the CodePipeline's S3 bucket.

2. Add a new custom type to CodePipeline

The only way to create a custom CodePipeline action type is via the aws cli. There are separate JSON files for each of the types Source, Build, Test and Deploy

The following command creates a custom action type for a Buildkite Test action:

codepipeline create-custom-action-type --cli-input-json file://custom-action-types/test.json
3. Use the task in your pipeline

Add a new pipeline action:

Choose the type you created earlier:

Configure it with your Buildkite details:

4. Start a Buildkite agent with the customized checkout hook
dkite-agent start --token xxx \
                  --hooks-path "$PWD/agent-hooks" \
                  --meta-data codepipeline=true
5. Run the CodePipeline job poller
poll.sh "category=Test,owner=Custom,version=1,provider=Buildkite"
ing for CodePipeline job for action-type-id 'category=Test,owner=Custom,version=1,provider=Buildkite'
6. Create a release

Create a new release on CodePipeline, either with the “Release change” button or via the cli like so:

codepipeline start-pipeline-execution --name my-pipeline

Your job poller should pick up the job, create a Buildkite build, and report back on the status:

d job. Creating build at https://api.buildkite.com/v1/organizations/myorg/projects/myproj/builds
d #398 created - https://buildkite.com/myorg/myproj/builds/398
owleding CodePipeline job (id: e3d5097b-5933-438d-af73-56d9eb0d5a41 nonce: 3)
d is running
d is running
d finished
ting CodePipeline job with 'passed' result

Your pipeline should now show the completed task, with a link to the successful Buildkite build:

:tada:

License

See LICENSE (MIT)


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.