Skip to content

Commit

Permalink
Move building binaries to pre-deploy step.
Browse files Browse the repository at this point in the history
  • Loading branch information
phillbaker committed Jun 30, 2019
1 parent b377885 commit a117447
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,19 @@ before_install:
install:
- export ELASTICSEARCH_URL=http://127.0.0.1:9200
- export TF_LOG=INFO
- env GO111MODULE=on go get github.com/mitchellh/gox
- env GO111MODULE=on go mod vendor
script:
- export TARGET_OS="freebsd darwin linux windows"
- export TARGET_ARCH="386 amd64"
- export FILE_NAME="terraform-provider-elasticsearch_${TRAVIS_TAG}_{{.OS}}_{{.Arch}}"
- export GO111MODULE=on
- wget -q --waitretry=1 --retry-connrefused -T 10 -O - $ELASTICSEARCH_URL
- TF_ACC=1 go test -v -cover
before_deploy:
- export GO111MODULE=on
- go get github.com/mitchellh/gox
- export TARGET_OS="freebsd darwin linux windows"
- export TARGET_ARCH="386 amd64"
# Use terraform provider conventions
# https://www.terraform.io/docs/configuration/providers.html#third-party-plugins
- export FILE_NAME="terraform-provider-elasticsearch_${TRAVIS_TAG}_{{.OS}}_{{.Arch}}"
- gox -os "$TARGET_OS" -arch "$TARGET_ARCH" -output="$FILE_NAME"
- CGO_ENABLED=0 gox -os "$TARGET_OS" -arch "$TARGET_ARCH" -output="${FILE_NAME}_static"
deploy:
Expand Down

0 comments on commit a117447

Please sign in to comment.