Skip to content

Commit 83f0c54

Browse files
committed
preinstall terraform on travis
1 parent cfa8e5b commit 83f0c54

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.travis.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ jobs:
88
sudo: required
99
services:
1010
- docker
11+
before_script:
12+
- curl -fSL "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip" -o terraform.zip
13+
- sudo unzip terraform.zip -d /opt/terraform
14+
- sudo ln -s /opt/terraform/terraform /usr/bin/terraform
15+
- rm -f terraform.zip
1116
script:
1217
- make test
1318
- make testacc
@@ -17,12 +22,21 @@ jobs:
1722
script:
1823
- make test
1924
- make testacc
25+
before_script:
26+
- curl -fSL "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_darwin_amd64.zip" -o terraform.zip
27+
- sudo unzip terraform.zip -d /opt/terraform
28+
- sudo ln -s /opt/terraform/terraform /usr/local/bin/terraform
29+
- rm -f terraform.zip
2030
- os: windows
2131
script:
2232
# TODO: ensure windows setup can support binary testing
23-
- TF_ACC=1 go test -v ./...
33+
- TF_ACC=1 TF_ACC_TERRAFORM_PATH=/c/Users/travis/bin/terraform go test -v ./...
34+
before_script:
35+
- curl -fSL "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_windows_amd64.zip" -o terraform.zip
36+
- unzip terraform.zip -d /c/Users/travis/bin
37+
2438
env:
25-
- GO111MODULE=on GOFLAGS=-mod=vendor
39+
- GO111MODULE=on GOFLAGS=-mod=vendor TF_VERSION=0.12.26
2640

2741
install:
2842
# This script is used by the Travis build to install a cookie for

0 commit comments

Comments
 (0)