forked from go-spatial/tegola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (76 loc) · 5.61 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
language: go
# Does nothing when building on terranodo/tegola, but makes builds work cleanly on forks.
go_import_path: github.com/terranodo/tegola
go:
- 1.9.x
- 1.8.x
- 1.7.x
env:
global:
# Secure DOCKER_USER & DOCKER_PASSWORD for user w/ permission to push to repo gospatial/tegola.
- secure: "dTdHWSn36tBKls7rM9ayUV7+IBijprmvPqPDWrbjc4XjRAPEW6wZkZ7Ln3qd2GNxe6GTlkAYKogMbqm475aT+s9/d2SqRp0nWlGI7FrAbM7W/v9HEWwjfgdsa1ksChN4zwbmLAeQ4owGnNyQiiE3fe3BzUuWbk6FrKpvhfRjdDAbCiPlt4/YG3rvvs3ePlJsAifCEBJj54ziwg9OThH7Z4TSM/SwhimJLMT60OO7Cqf2jqV7sDnEtttV5i8lSsjk8EACsnfvGtx+SKA7QQMk7OgrW1oNI61jKI3xYALW0JHGdnafIlmizj4NUqKcC9PQbD3pJX6+2b13YWBxNqA9SDk8/0Jwt23XeFvvmxrfYx523VU2XYpq3D/mOgXvWx+LgbjDjQOUwdFoNZ/UGJCPQbD/3uYSDKXIAM8HI3Lzoi2Ej9Xr1wuaPbWPCgQQXoV8KuamJRlkWFLFTUkQ+F2h9aZYHwaZgYmRhDjE3s/QrftLu5fx8uSUULx9Azu4Tj/LB4F3gti7ZXQwlSI0j5BGV7oAMUJq6NAdgOV4Wnz7BQM/oBkfy8ZtOwqUeJUhCwnjnPE6G3Wgo4/9/iCdEg9dRHbuP2/TSxdA0YyLEdXuE8MyE1SqkFoFECNBYWrV2JZV1BN1sGVudxKUeNKfM2FcD0xkx9xPol2x0/hYl3S+Xn8="
- RUN_POSTGIS_TESTS=yes
- PGHOST="localhost"
- PGPORT=5432
- PGDATABASE="tegola"
- PGUSER="postgres"
- DOCKERHUB_ORG="gospatial"
- DOCKERHUB_REPO="tegola"
# "COVERALLS_TOKEN" nvp encrypted using travis CLI - contains api key used to post test coverage results to coveralls.io account repo associated w/ github repo
- secure: UtUTE+1Qhw2xal+Tcrsiag7H8bOjanksc0h/dmYE0NwC/nXIgmJPkA5zvowaP631Orw2iNeYM7mqOJqiNZ1fV30V4fbELogkDcpJEK9oYxl0xYpPMrd+EMrkm+aRZAnh31pvtxHNzf3lTpg2L3TAREEsDTU5tunxRBysgGjf89hmCWQ7GzN1+qSIIgCCZrX5tdAwUMDztrGc8aQJxhDPJZ+rHeEZ5qASTI7VdJxJ8wez+PmDQRPYp1glqXDU8JCDxhmBrD+8n3YZs/O0P7qEX41Dn670+ZLtZBp/EqbGGN8zOCOH3LrxnnmX/zopyvD0L6i8zkWIYDb0O9wwtahNT4ibT700h0v86B/ii9mvVjo3eSpBIiqfmqfaNuLaIQZl5q/UM9NMhdhYswmhjaBmLf2JEAtH+r7iQc9npR4hwxm7Fc04me3jkgBySE2uQfghAMpIgOwsGN9ip6ktJrvO047rnyMd7Zp95Z2MqoOOr21FS+7dqTTzfNWBf4eWa8sQALsQ54G9JC9CmO4poijcZmXPHcPtWHNvmjMbPHm5u0kYeZyi3XmvANC9N/bSmsMvhWT77ck7yQsiXiaLPNRftQj3YclGeCOz0QXc+vC7ECu9HCazri9NvymwHQ6uFFJMgzrIKDBrOA20cCj8sQwIhysIiwS6PFNEU8gQYApuJUY=
services:
- postgresql
addons:
postgresql: "9.4"
apt:
packages:
- postgresql-9.4-postgis-2.3
install:
- bash ci/build_bindata.sh
- bash ci/config_postgis.sh
# "script" phase occurs after "install" and before "deploy" phases (and sub-phases) - see https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle
# by default, in absence of "script" phase, travis go build executes "go test -v ./..." - see https://docs.travis-ci.com/user/languages/go/#Default-Build-Script
# which we replace below since we want to execute "go test" against multiple packages while generating a cover profile for each - "go test" does not currently
# support this, so we use custom script go_test_multi_package_coverprofile.sh to do so... this script also aggregates generated cover profiles into a single
# coverage profile and then finally posts the results to the coveralls.io acccount/repo associated with the encrypted API key/token above - see "COVERALLS_TOKEN"
# in env|global section, above
script:
- bash ci/go_test_multi_package_coverprofile.sh --coveralls
before_deploy:
- docker build -f docker/Dockerfile -t $DOCKERHUB_ORG/$DOCKERHUB_REPO:$TRAVIS_TAG .
- docker tag $DOCKERHUB_ORG/$DOCKERHUB_REPO:$TRAVIS_TAG $DOCKERHUB_ORG/$DOCKERHUB_REPO:latest
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push $DOCKERHUB_ORG/$DOCKERHUB_REPO:$TRAVIS_TAG
- docker push $DOCKERHUB_ORG/$DOCKERHUB_REPO:latest
- go get github.com/mitchellh/gox
- cd cmd/tegola/ # If you change this directory change back so deploy.file finds what it needs
- gox -ldflags "-w -X github.com/terranodo/tegola/cmd/tegola/cmd.Version=$TRAVIS_TAG" -output "{{.Dir}}_{{.OS}}_{{.Arch}}"
deploy:
provider: releases
api_key:
secure: GrkTzVjddIHB8MXfLloPgifJKrZuFptk9DzrrSSXAOxxBBqYnddg2WKAr2TfrPLQaSNdR84PaPN3FXW009W/CjclxM3mW9h9a/sFVlWtWOWd5u/szFPwn5JQKKt0D/EhScBUF9Jvyo4g28YxSR9rV/RnJne/B6pthJAFSrztHglC7XGkW9mSTH7aG68yIALoGeqHRIKT3DDHJPCm14EEXKq8oacJSX6SZyexBcBJRKj8S+/k3HoYDeKqvCC8oPHt1kPHXiSF/mZdeox0CQ+Q9B3cWPu6rFNbOjiLQriq9ayY/DxdZPVHdQ/nFkTpBQ3lwDLFL4X2jcT1V0jvNxJnExJOXV9lFtjvyExqr7quGHTMd4iJVeYOkWwEl8/cJJAoePIlKaGL5FDxLhlq1RscHOu25sd1DgmbhJMjlexxG/bXyJhV873kyv6JhIq+XniA2TxpaMMrut8MOBH76THbQr9yWpdf6GXs7NdRiK8yzS+L/hvXJO88NXegavCk8gGtWhHSLSJzYg5fVIo9QdghfRe8cLj2HcMehwzLyu3GRiWdm8TtNQ+PIp9qXxB+BIOfXN+Dx1ydVdlt8aghefONw9+0zDtrGZhWyORMHBCypXrTEmiGxlIfsR4QQxVpejd8DXi3i9CQou68ECuC51YqxhH49tfiE8Adh0WPKCklRnY=
file:
- tegola_darwin_386
- tegola_linux_386
- tegola_netbsd_arm
- tegola_darwin_amd64
- tegola_linux_amd64
- tegola_openbsd_386
- tegola_freebsd_386
- tegola_linux_arm
- tegola_openbsd_amd64
- tegola_freebsd_amd64
- tegola_netbsd_386
- tegola_windows_386.exe
- tegola_freebsd_arm
- tegola_netbsd_amd64
- tegola_windows_amd64.exe
skip_cleanup: true
on:
tags: true
condition: "$TRAVIS_GO_VERSION =~ ^1\\.9\\.[0-9]+$"
notifications:
email:
on_success: never
slack:
secure: TzRnZdJ1dhQJg9nby2oJ6qFj9Bl20VJ2aJXmXwADsj2ck/UGsFWpYNnqZVWvZomCZEJinFpA/h2TG1odEzg1BpCT0+rLIGQDAhIMVuici+nIs+DyPQmL2owG1LZ6/hzX09Y1mIZci0nmnI1wousfM8WDPRq5NSOsBeAMlixGR4g4lF8cp/R0B6CtcewtQx4RicdPJtopHDwXm5KI1/7euFcJwu15FWwWoUp6mOw+r44T1Md+qbqDKBbLSy+YvMkPcxI7HeECa7OP9OjkeUfU0BoMP6qqo9QTVX5v6lOHxA+FhueyyPrSTtNV377tilDy88kytqu6w8gcrxZOddj7nFbv6ErjfVaMfeepzk/HH2bzlLevvL+ukeJKrBNdmPuDRU3BqG5ygrdGAQUNpM7VSXLDcGrM2+ocVn/HO1NyXWwpejq7Gq0HWhNkYPHG5c7+khkQkRGJtg0wp9R3qXDAcRHLR+CHh89g5Blz4Wo6R/Q48MLJycbH/W56zsoe0xQ5Ww2eti16uSFE4kkiPt99uewWkPSfEZn4pyk+xCwDxgNDNu/BaV+Mjm4JTL1GjWalto+NLK7NsEg+6sEYok0CHkUb8MQV++r1KVfIaxC3zVuojIiOSB9/+JPtPd9w2iuVOlz0rrbXfKkkSf5wcmOguqk3aAfAgmcjAV9p1kI9pSc=