Skip to content

Commit

Permalink
travis config for custom builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sl1pm4t committed Mar 12, 2018
1 parent e5faf3a commit 2c59612
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
39 changes: 20 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
dist: trusty
sudo: false
language: go
sudo: false
go:
- 1.9

install:
# This script is used by the Travis build to install a cookie for
# go.googlesource.com so rate limits are higher when using `go get` to fetch
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- '1.10'
before_script:
- bash scripts/gogetcookie.sh
- go get github.com/kardianos/govendor

- go get ./...
script:
- make test
- make vendor-status
- make fmtcheck
- make vet

- make test
branches:
only:
- master
matrix:
fast_finish: true
allow_failures:
- go: tip
- custom
before_deploy:
- make targets
deploy:
provider: releases
api_key:
secure: 3XRh95yUkU1SA/Fwk9beSrSEv0fc1Eot4/MSmOuib1+Do27OKmUVvN6jQkj5dLVoeHJnsv9iAMRxuxmb+YL2HvX2o47cxhwiiB+qU4Jyv2bSuGsapIoyLpUZqhap9VpGsXWlRmXh/gwjovXP22ECayY/5/06hH//JzSXlOa881Z43LLaKHhS1ouVtBYtfPhvCSQI+MMVjBYKYyijVPXePmjoa5z++WQg3DewGIv9yXUy+96ndKWNbihsDubMQbgbzmi+BPQueAF3H/rIbsVCx42eon3CXdBHBfQxWl7M7UXJphrTNZIIUcwYqKn5dgg1LJ5WYDy4M9vu0LQ8bzp23AvLPdC2infrm+yi2Ej6wNn7bcpff+4Dy1rGtwawcn6tFwuV01I+imFEjE8+hAxjRR0R2d7BjvWyQF0rOEdBVJnA8CDffdjJi7ZQS0WSVqdLGfpeYZS+/z/I0So7S3NTPBXpaUSBkmuXloIVsgf9zhRmVzThagj+euyf5t5hWiiERa8RpNg5xMyzWdofemX4WbPdhyF0VbupZRXE/gnPiZ7vAUzgcf28RfIWiFVzZ+OtexakZpK3Ylb24xeQMgXOX1qPa81W3x7KgS1jesoD7LVyY31YM03qmmmfWG7V4a3I1bm140gdCDfXPYS+hMSbG3rsB3WqIhKNdzIIIh3pXCo=
file: dist/*.zip
file_glob: true
skip_cleanup: true
on:
repo: sl1pm4t/terraform-provider-kubernetes
tags: true
branch: custom
13 changes: 10 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
TARGETS=darwin linux windows

default: build

build: fmtcheck
go install

test: fmtcheck
go test -i $(TEST) || exit 1
go test -v -i $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
xargs -t -n4 go test -v $(TESTARGS) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
Expand Down Expand Up @@ -43,5 +44,11 @@ test-compile:
fi
go test -c $(TEST) $(TESTARGS)

.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile
targets: $(TARGETS)

$(TARGETS):
GOOS=$@ GOARCH=amd64 go build -o "dist/$@/terraform-provider-tfstate_${TRAVIS_TAG}_x4"
zip -j dist/terraform-provider-tfstate_${TRAVIS_TAG}_$@_amd64.zip dist/$@/terraform-provider-tfstate_${TRAVIS_TAG}_x4

.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile targets $(TARGETS)

0 comments on commit 2c59612

Please sign in to comment.