Continuous Integration: Jets and CodeBuild

This page discusses setting up Continuous Integration. We’ll use CodeBuild, a fully managed build service from AWS. It is similar to other services like: circleci, travis-ci, semaphoreci, etc.

An advantage of using CodeBuild is that you can use IAM roles. The IAM role associated with the CodeBuild machine is the only thing that requires IAM permission to deploy and create AWS resources.

This security posture is considered better than deploying from a development machine. The only IAM permission required on a development machine is access to start a build. This reduces the potential blast radius. Additionally, it helps scale the deployment process so additional team members can deploy without setting everything up.

Examples

The Jets Examples uses the codebuild.cloud tool to simplify creating and managing the CodeBuild project. The codebuild tool is essentially a DSL wrapper that creates the CodeBuild project and IAM role with CloudFormation.

The Jets Example shows how to set up 1 simple CodeBuild project that will run specs and then deploy the Jets application.

There’s also an additional example in the separate-unit-and-deploy branch in the GitHub repo that shows how to create 2 separate CodeBuild projects for unit tests and deployment. Some advantages:

  • The projects are decoupled and you can run them separately.
  • Only the deploy project requires IAM access to create the AWS resources.

Refer to the codebuild.cloud jets examples docs for the details.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub, and contributions are encouraged and welcomed. We love pull requests from you!