Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #49 from gruntwork-io/tf12
Browse files Browse the repository at this point in the history
Terraform 0.12 upgrade
  • Loading branch information
brikis98 authored Jun 25, 2019
2 parents 68e85dd + 08b7969 commit 33a378c
Show file tree
Hide file tree
Showing 42 changed files with 1,700 additions and 862 deletions.
44 changes: 28 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
defaults: &defaults
# We need to run Docker Compose with volumes, which isn't supported by CircleCI's Docker executor, so we have to use
# the machine executor instead.
machine:
image: circleci/classic:201711-01
environment:
GRUNTWORK_INSTALLER_VERSION: v0.0.21
TERRATEST_LOG_PARSER_VERSION: v0.13.24
MODULE_CI_VERSION: v0.13.15
TERRAFORM_VERSION: 0.12.2
TERRAGRUNT_VERSION: NONE
PACKER_VERSION: 1.4.1
GOLANG_VERSION: 1.11

version: 2
jobs:
test:
# We need to run Docker Compose with volumes, which isn't supported by CircleCI's Docker executor, so we have to use
# the machine executor instead.
machine: true
<<: *defaults
steps:
- checkout

Expand All @@ -13,20 +25,20 @@ jobs:
# Install Gruntwork and HashiCorp dependencies
- restore_cache:
keys:
- v1-external-dep
- v1-dep-{{ checksum "test/Gopkg.lock" }}
- v2-external-dep
- v2-dep-{{ checksum "test/Gopkg.lock" }}
# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version v0.0.21
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
- run: gruntwork-install --binary-name "terratest_log_parser" --repo "https://github.com/gruntwork-io/terratest" --tag v0.14.2
- run: configure-environment-for-gruntwork-module --circle-ci-2-machine-executor --go-src-path test --use-go-dep
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
- run: gruntwork-install --binary-name "terratest_log_parser" --repo "https://github.com/gruntwork-io/terratest" --tag "${TERRATEST_LOG_PARSER_VERSION}"
- 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
- save_cache:
key: v1-external-dep
key: v2-external-dep
paths:
- $HOME/terraform
- $HOME/packer
- save_cache:
key: v1-dep-{{ checksum "test/Gopkg.lock" }}
key: v2-dep-{{ checksum "test/Gopkg.lock" }}
paths:
- $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/test/vendor

Expand Down Expand Up @@ -56,18 +68,18 @@ jobs:
path: /tmp/logs

release:
machine: true
<<: *defaults
steps:
- checkout

# The weird way you have to set PATH in Circle 2.0
- run: echo 'export PATH=$HOME/.local/bin:$HOME/terraform:$HOME/packer:$PATH' >> $BASH_ENV

# Use the Gruntwork Installer to install the gruntwork-module-circleci-helpers
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version v0.0.21
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
- run: gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
- run: gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
- run: curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
- run: gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
- run: gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
- run: gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "${MODULE_CI_VERSION}"
- 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

- run: ~/project/.circleci/publish-amis.sh "ubuntu-ami"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![Maintained by Gruntwork.io](https://img.shields.io/badge/maintained%20by-gruntwork.io-%235849a6.svg)](https://gruntwork.io/?ref=repo_aws_couchbase)
![Terraform Version](https://img.shields.io/badge/tf-%3E%3D0.12.0-blue.svg)

# Couchbase AWS Module

This repo contains a Module for deploying [Couchbase](https://www.couchbase.com/) on [AWS](https://aws.amazon.com/)
Expand Down
10 changes: 7 additions & 3 deletions examples/couchbase-ami/couchbase.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@
"inline": ["mkdir -p /tmp/terraform-aws-couchbase"]
},{
"type": "file",
"source": "{{template_dir}}/../../",
"destination": "/tmp/terraform-aws-couchbase"
"source": "{{template_dir}}/../../modules",
"destination": "/tmp/terraform-aws-couchbase/modules"
},{
"type": "file",
"source": "{{template_dir}}/sync_gateway.json",
"destination": "/tmp/terraform-aws-couchbase/sync_gateway.json"
},{
"type": "shell",
"inline": [
"/tmp/terraform-aws-couchbase/modules/install-couchbase-server/install-couchbase-server --edition {{user `edition`}}",
"/tmp/terraform-aws-couchbase/modules/install-sync-gateway/install-sync-gateway --edition {{user `edition`}} --config /tmp/terraform-aws-couchbase/examples/couchbase-ami/sync_gateway.json"
"/tmp/terraform-aws-couchbase/modules/install-sync-gateway/install-sync-gateway --edition {{user `edition`}} --config /tmp/terraform-aws-couchbase/sync_gateway.json"
]
}],
"post-processors": [{
Expand Down
Loading

0 comments on commit 33a378c

Please sign in to comment.