CodeBuild

A powerful DSL to create CodeBuild projects. The codebuild tool simplifies creating and managing CodeBuild projects.

Learn More!

The Code

Easy to learn


Overview

cb init
cb deploy
cb start
cb delete

Structure

.codebuild
├── buildspec.yml
├── role.rb
├── project.rb
└── schedule.rb

Usage

cb deploy # infers the project name from the parent folder
cb deploy project-name # explicitly specify project name

cb start # infers the project name from the parent folder
cb start demo-project # looks up project via CodeBuild project name

cb deploy demo --type unit # different codebuild project types
cb start demo --type unit

project.rb

github_url("https://github.com/tongueroo/demo-ufo")
linux_image("aws/codebuild/ruby:2.5.3-1.7.0")
environment_variables(
  UFO_ENV: "development",
  API_KEY: "ssm:/codebuild/demo/api_key" # ssm param example
)

role.rb

iam_policy("logs", "ssm")

schedule.rb

rate "1 day"

Learn More

Quick Start