Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
title nav_order
Quick Start

In a hurry? No problem! Here's a quick start to get going.


gem install cody
cd <your-project>
cody init # generates starter .cody files
# edit .cody/buildspec.yml
# git commit and push your changes. codebuild will git pull them down.
# edit .cody/project.rb - replace with your repo
cody deploy # create the CodeBuild project via CloudFormation
cody start  # start a CodeBuild project. Runs the buildspec.yml

What Happened?

Here are a little more details on what the summarized commands do. First, we install cody tool.

gem install cody

Change into your project directory.

cd <your-project>

If you do not have a project, simply create an empty folder.

mkdir demo
cd demo

Create the starter .cody files in the project.

cody init # generates starter .cody files

An important generated file .cody/buildspec.yml. The starter file looks something like this:

      ruby: latest
      - echo Build started on `date`
      - uptime

All it does is run a uptime command as part of the CodeProject build. Edit it for your needs. Remember to commit it and push it to the repo.

The CodeBuild project is defined in .cody/project.rb via the [Project DSL]({% link _docs/dsl/ %}). It looks something like this:

  JETS_ENV: "test"

To define a project, it's only 3 lines of code.

Make sure you push to github, since codebuild will be pulling from it.

git remote add origin # update with your own repo
git add .
git commit -m 'test commit'
git push


Now we're ready to deploy. You can deploy it with a single command:

cody deploy

This deploys a CloudFormation stack that creates a CodeBuild project and IAM role. The IAM role permissions is defined in .cody/role.rb via the [IAM Role DSL]({% link _docs/dsl/ %}).

Once the stack is complete. You can start the CodeBuild project via the CLI or the CodeBuild console. Here is the CLI command:

cody start

Here's what CodeBuild project output looks like:

{% include %}