This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (63 loc) · 2.48 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language: go
go:
- 1.11.4
- master
notifications:
email:
on_success: never
on_failure: always
matrix:
# It's ok if our code fails on unstable development versions of Go.
allow_failures:
- go: master
# Don't wait for tip tests to finish. Mark the test run green if the
# tests pass on the stable versions of Go.
fast_finish: true
cache:
directories:
- $GOPATH/pkg
env:
- GO111MODULE=on
install:
- curl -L https://git.io/vp6lP | sh
- export PATH=$TRAVIS_BUILD_DIR/bin:$PATH
- go mod vendor
- cp hack/bindata.go vendor/k8s.io/kops/upup/models/bindata.go
script:
- go test -mod vendor -v ./...
- gometalinter
before_deploy:
- PLATFORMS=(darwin/amd64 freebsd/amd64 linux/amd64 windows/amd64)
# build binary for all archs
- |
for PLATFORM in "${PLATFORMS[@]}"; do
echo "Building $PLATFORM"
GOOS=${PLATFORM%/*}
GOARCH=${PLATFORM#*/}
if [ "$GOOS" = "windows" ]; then
build_cmd="GOOS=$GOOS GOARCH=$GOARCH go build -mod vendor -o terraform-provider-kops -ldflags '-w -s'"
else
build_cmd="CGO_ENABLED=0 GOOS=$GOOS GOARCH=$GOARCH go build -mod vendor -o terraform-provider-kops -ldflags '-w -s'"
fi
if ! eval $build_cmd; then
echo "Failed building sample for $PLATFORM" && return 1
fi
if [ "$GOOS" = "windows" ]; then
zip terraform-provider-kops-${GOOS}-${GOARCH}.zip terraform-provider-kops
else
tar cvzf terraform-provider-kops-${GOOS}-${GOARCH}.tgz terraform-provider-kops
fi
done
- ls
deploy:
provider: releases
api_key:
secure: bOGUItplspqPaDdurnba2sRAgaUf1mXCPh/n74QNlptRqe4I0d1kqIf4CBfMdY5c0fuTj9Dt1T2mjQ7pnpT5WYJDqibNubbnqbzn37ArPvD0mN9nVk7q0t1VnMzRgKGs4yj1KM+c7sA/2qM2zCcbmPB7mbUA8rzu9H/Ibdq+Gl1YdKUKQGtp0gHFgFzfMSDmhTJuw4/aY7Keuank52u1mR+cWVjbTnPCEcKpQCoYUeGGGu+OzAqiSr5u+GUZgJrxErwj8QCQdlMc/gbCQXJYVA8gqn9hR1wdfjtXK6xr2ltL7IvGug/OZGKxSvdrDNRAc8ew3I+28McvR5QuOMp/KGwo/iB96zAmKpOiAaSF6pnzkdNakeVHgatGRcugxdEJmVk+f6VfxdILX2nImtIfIHDyUDRa/CrMw7Hyhn8moo6TwyXsCii0/dZTKvdxwtK4uhlHObNHOyWcTHJmhwumLheTDUlq8L54x0REJhCcFtR/yAmk1/8vAmfI4cN2S9s8KflEW8nQHR7RssDPalgwE1SmMjvt3WCHiKBkoG6YgfcRtqbo6xYK1Gia0E+8JtVS3A7zRP1gamHRsfzxC/94WTmjW8mkYv28f6KMktfRrcrC0k9S1WD0ucNBdtvkKJl0qex9s8fwIhK+bZzeOuxo/TGh85Fxw/xkDOuSmLlQ0ms=
file:
- "terraform-provider-kops-darwin-amd64.tgz"
- "terraform-provider-kops-freebsd-amd64.tgz"
- "terraform-provider-kops-linux-amd64.tgz"
- "terraform-provider-kops-windows-amd64.zip"
skip_cleanup: true
on:
tags: true