Skip to content

Instantly share code, notes, and snippets.

@mdawn
Created August 7, 2020 16:31
Show Gist options
  • Save mdawn/16eecdc4c91d965688141acbf198ac2c to your computer and use it in GitHub Desktop.
Save mdawn/16eecdc4c91d965688141acbf198ac2c to your computer and use it in GitHub Desktop.
version: 2
jobs:
# job 1 is build requiring go, then share the build with "require" or "attach workspace" calls:
build
docker:
- image: circleci/go:whateverVersion
working_directory: ~/terraform-aws-ses
steps:
- checkout
- restore_cache:
keys:
- v1.0.0-dependencies-{{ checksum "go.mod or whatever" }}
- v1.0.0-dependencies-
make test
# job 2 is for the precommit, which requires the build to get the dependencies
build
requires:
- build
docker:
- image: circleci/ruby:2.4
working_directory: ~/terraform-aws-ses
steps:
- checkout
- restore_cache:
keys:
- v1.0.0-dependencies-{{ checksum "pip or whatever" }}
(maybe a call to a script to run it specifically)
# job 3 and so forth...with other images or shared stuff intertwined as needed
workflows:
version: 2
build_and_terratest_and_precommit:
jobs:
- build
- precommit:
requires:
- build
- terratest:
requires:
- build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment