Skip to main content
CI Modules 0.53.1Last updated in version 0.53.0

CircleCI Helpers

View SourceRelease Notes

This module contains helper scripts specially for CircleCI jobs, including:

  • place-repo-in-gopath: Places the git repo that triggered the CircleCI build in the GOPATH. This is useful because some tools (e.g. vendoring tools) require that they be executed in a repo located within the GOPATH.
  • install-go-version: Installs the given version of Golang.

Installing the helpers

You can install the helpers using the Gruntwork Installer:

gruntwork-install --module-name "circleci-helpers" --repo "https://github.com/gruntwork-io/terraform-aws-ci" --tag "0.0.1"

We recommend running this command in the dependencies section of circle.yml:

dependencies:
override:
# Install the Gruntwork Installer
- curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/main/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version 0.0.9

# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers module
- gruntwork-install --module-name "circleci-helpers" --repo "https://github.com/gruntwork-io/terraform-aws-ci" --tag "0.0.5"

Using the place-repo-in-gopath script

The place-repo-in-gopath script will create symlinks so GOPATH works correctly, as explained in this post.

We recommend running this helper in the dependencies section of circle.yml:

dependencies:
override:
# Install the Gruntwork Installer
- curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/main/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version 0.0.9

# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers module
- gruntwork-install --module-name "circleci-helpers" --repo "https://github.com/gruntwork-io/terraform-aws-ci" --tag "0.0.1"

# Place the repo in the GOPATH
- place-repo-in-gopath