1
+ defaults : &defaults
2
+ # We need to run Docker Compose with volumes, which isn't supported by CircleCI's Docker executor, so we have to use
3
+ # the machine executor instead.
4
+ machine :
5
+ image : circleci/classic:201711-01
6
+ environment :
7
+ GRUNTWORK_INSTALLER_VERSION : v0.0.21
8
+ TERRATEST_LOG_PARSER_VERSION : v0.13.24
9
+ MODULE_CI_VERSION : v0.13.15
10
+ TERRAFORM_VERSION : 0.12.2
11
+ TERRAGRUNT_VERSION : NONE
12
+ PACKER_VERSION : 1.4.1
13
+ GOLANG_VERSION : 1.11
14
+
1
15
version : 2
2
16
jobs :
3
17
test :
4
- # We need to run Docker Compose with volumes, which isn't supported by CircleCI's Docker executor, so we have to use
5
- # the machine executor instead.
6
- machine : true
18
+ << : *defaults
7
19
steps :
8
20
- checkout
9
21
@@ -13,20 +25,20 @@ jobs:
13
25
# Install Gruntwork and HashiCorp dependencies
14
26
- restore_cache :
15
27
keys :
16
- - v1 -external-dep
17
- - v1 -dep-{{ checksum "test/Gopkg.lock" }}
28
+ - v2 -external-dep
29
+ - v2 -dep-{{ checksum "test/Gopkg.lock" }}
18
30
# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers
19
- - run : curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version v0.0.21
20
- - run : gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1 "
21
- - run : gruntwork-install --binary-name "terratest_log_parser" --repo "https://github.com/gruntwork-io/terratest" --tag v0.14.2
22
- - run : configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --go-src-path test --use-go-dep
31
+ - run : curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
32
+ - run : gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION} "
33
+ - run : gruntwork-install --binary-name "terratest_log_parser" --repo "https://github.com/gruntwork-io/terratest" --tag "${TERRATEST_LOG_PARSER_VERSION}"
34
+ - run : configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --terraform-version ${TERRAFORM_VERSION} --terragrunt-version ${TERRAGRUNT_VERSION} --packer-version ${PACKER_VERSION} -- use-go-dep --go-version ${GOLANG_VERSION} --go-src-path test
23
35
- save_cache :
24
- key : v1 -external-dep
36
+ key : v2 -external-dep
25
37
paths :
26
38
- $HOME/terraform
27
39
- $HOME/packer
28
40
- save_cache :
29
- key : v1 -dep-{{ checksum "test/Gopkg.lock" }}
41
+ key : v2 -dep-{{ checksum "test/Gopkg.lock" }}
30
42
paths :
31
43
- $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/test/vendor
32
44
@@ -56,18 +68,18 @@ jobs:
56
68
path : /tmp/logs
57
69
58
70
release :
59
- machine : true
71
+ << : *defaults
60
72
steps :
61
73
- checkout
62
74
63
75
# The weird way you have to set PATH in Circle 2.0
64
76
- run : echo 'export PATH=$HOME/.local/bin:$HOME/terraform:$HOME/packer:$PATH' >> $BASH_ENV
65
77
66
78
# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers
67
- - run : curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version v0.0.21
68
- - run : gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1 "
69
- - run : gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1 "
70
- - run : gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1 "
79
+ - run : curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
80
+ - run : gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION} "
81
+ - run : gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION} "
82
+ - run : gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION} "
71
83
- run : configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --go-src-path test --use-go-dep --terraform-version NONE --terragrunt-version NONE --glide-version NONE
72
84
73
85
- run : ~/project/.circleci/publish-amis.sh "ubuntu-ami"
0 commit comments