forked from tsuru/tsuru
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
79 lines (79 loc) · 2.73 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
language: go
install: true
sudo: required
addons:
apt:
packages:
- rsyslog
- xmlsec1
- rpm
# test stage automatically added for each go version
go:
- 1.11.x
- master
# script used in the automatically added test stage
script:
- 'if [ "${JOB}" = "test" ]; then make race; fi'
- 'if [ "${JOB}" = "leakdetector" ]; then make leakdetector; fi'
- 'if [[ "${JOB}" == "bench" && "${TRAVIS_PULL_REQUEST}" == "false" ]]; then while true; do echo .; sleep 30; done & ./misc/bench.sh; fi'
- 'if [ "${JOB}" = "gometalinter" ]; then while true; do echo .; sleep 30; done & if [ "${TRAVIS_EVENT_TYPE}" = "push" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then make lint; else make metalint; fi; fi'
- 'if [ "${JOB}" = "checkhandlers" ]; then ./misc/check-handlers.sh; fi'
- 'if [ "${JOB}" = "checkevents" ]; then ./misc/check-events.sh; fi'
- 'if [ "${JOB}" = "checkapidocs" ]; then make check-api-doc; fi'
- 'if [ "${JOB}" = "validateapispec" ]; then make validate-api-spec; fi'
- 'if [ "${JOB}" = "validatecodegen" ]; then ./hack/verify-codegen.sh; fi'
env:
global:
- GOARCH=amd64
- GO_FOR_RELEASE=1.11
- IMAGE_NAME=tsuru/api
matrix:
- JOB=test
- JOB=bench
- JOB=leakdetector
- JOB=gometalinter
- JOB=checkhandlers
- JOB=checkevents
- JOB=checkapidocs
- JOB=validateapispec
jobs:
fast_finish: true
allow_failures:
- go: master
exclude:
- go: master
env: JOB=bench
- go: master
env: JOB=gometalinter
- go: master
env: JOB=checkhandlers
- go: master
env: JOB=checkevents
- go: master
env: JOB=checkapidocs
- go: master
env: JOB=validateapispec
- go: master
env: JOB=validatecodegen
include:
- stage: deploy
script:
- CGO_ENABLED=0 go build -ldflags "-X github.com/tsuru/tsuru/cmd.GitHash=`git rev-parse HEAD`" ./cmd/tsurud/
- curl https://raw.githubusercontent.com/tsuru/push-to-docker/master/push.sh | bash
env: JOB=docker hub
- script: if [ -n "$TRAVIS_TAG" ]; then curl -sL https://raw.githubusercontent.com/tsuru/push-to-packagecloud/master/push.sh | PACKAGE_NAME=tsuru-server bash; fi
env: JOB=package cloud
- stage: integration-check
script: ./misc/trigger-integration.sh
notifications:
email:
on_success: change
on_failure: always
slack:
rooms:
- secure: QJe4k18ACRUP4CDo245vBFu1hpVlcR3JPWjT7NL/vAE/Y5KDn5pNXIREPYIx9F/f8lvjF2RrQxjApeUujRh1PPt2Q53JulvaDCfM5a5SYnk5yoqu3ynlfqU4AOTDa6kzoJ3K4M9X8JhMpOtr3+IOPbwV88FjPvwviZN4p0L/0wc=
- secure: PUf33dfseOSrtp8Eoxx7cZoaR+O2zwJ3V++2k3zBXlhZRIntRdyoiZlax2NlKVGPgNMtT1WCQzufGVmvF1GVkkUC+c94wkEG8Qxzzwrcp476+VSfQSla95wFNuAjn0tuhqHommw9CncVUAF+2pfycPR/fmxDfgQaQTL3dsHy66E=
services:
- redis
- docker
- mongodb