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

Commit bbc7510

Browse files
authored
Merge pull request #19 from gruntwork-io/release-fixes
Remove root folder path workaround
2 parents ef53b5e + f5c7b9b commit bbc7510

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
- run: gruntwork-install --module-name "build-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
5656
- run: gruntwork-install --module-name "aws-helpers" --repo "https://github.com/gruntwork-io/module-ci" --tag "v0.7.1"
5757

58-
- run: ~/$CIRCLE_PROJECT_REPONAME/.circleci/publish-amis.sh "ubuntu-ami"
59-
- run: ~/$CIRCLE_PROJECT_REPONAME/.circleci/publish-amis.sh "amazon-linux-ami"
58+
- run: ~/project/.circleci/publish-amis.sh "ubuntu-ami"
59+
- run: ~/project/.circleci/publish-amis.sh "amazon-linux-ami"
6060

6161
workflows:
6262
version: 2

examples/couchbase-ami/couchbase.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"variables": {
44
"aws_region": "us-east-1",
55
"edition": "enterprise",
6-
"base_ami_name": "couchbase",
7-
"root_folder_path": "{{template_dir}}/../../../terraform-aws-couchbase/"
6+
"base_ami_name": "couchbase"
87
},
98
"builders": [{
109
"name": "ubuntu-ami",
@@ -109,7 +108,7 @@
109108
"inline": ["mkdir -p /tmp/terraform-aws-couchbase"]
110109
},{
111110
"type": "file",
112-
"source": "{{user `root_folder_path`}}",
111+
"source": "{{template_dir}}/../../",
113112
"destination": "/tmp/terraform-aws-couchbase"
114113
},{
115114
"type": "shell",

test/terratest_helpers.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"net/url"
99
"io/ioutil"
1010
"strings"
11-
"os"
1211
"github.com/gruntwork-io/terratest/modules/logger"
1312
"github.com/gruntwork-io/terratest/modules/packer"
1413
"github.com/gruntwork-io/terratest/modules/aws"
@@ -54,17 +53,6 @@ func buildCouchbaseWithPackerE(t *testing.T, builderName string, baseAmiName str
5453
},
5554
}
5655

57-
// The Packer file provisioner we use tries to copy this entire Couchbase module using a relative path like
58-
// ../../../terraform-aws-couchbase. This works fine in a normal checkout, but with CircleCi, (a) the code is
59-
// checked out into a folder called "project" and not "terraform-aws-couchbase" and (b) to support GOPATH, we
60-
// create a symlink to the original project and run the tests from that symlinked folder. One or both of these
61-
// issues leads to very strange issues that sometimes cause the Packer build to fail:
62-
// https://github.com/hashicorp/packer/issues/6103
63-
if os.Getenv("CIRCLECI") != "" {
64-
logger.Logf(t, "Overriding root folder path for Packer build to /home/circleci/project/")
65-
options.Vars["root_folder_path"] = "/home/circleci/project/"
66-
}
67-
6856
return packer.BuildAmiE(t, options)
6957
}
7058

0 commit comments

Comments
 (0)