forked from kiali/kiali
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (48 loc) · 3.35 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
sudo: required
services:
- docker
language: go
go:
- 1.9.4
notifications:
irc:
channels:
- chat.freenode.net#kiali
on_success: change
on_failure: change
before_script:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
env:
global:
- secure: "qy2ptBm0rm1gu2tWGRYZVB+IGy2aJXz40lrTbh/v01kE/iauK7knUYlpY4hkHBR8tTuvmDipHJJZSPhQrGLiLJU7+lSlr4X2pBJbou+hGal0pPlio379Bn3UZ0RTPE1kw8E6e007gGEcTQmFDeOCxQ1Rtm426guaL4SnXBM5D3dtQqEVhkgYGjivnOl2wrrqz1gBF/76OUfCN4nTwhJqiyiM/ELX3hYQ7CZcRQ7sZ+RqXEpR6zum+tgGauQ7zO+ebWKGn76ZaInZ4hnTx/hoiBmQ5jm6vOpOK2+Vqrskleh8QUvSRk1p1qjjUDj0gqgX2NoxqTrqSb6kMjez3hJCCz8teibuDBNqmER/mSoTFZQhMZYKwnUSe+xM9O+O2gOgNTwdm0Ejj1cY28BH02YiondG0mrX+xplFyzsDXOPdUdQdkT2YNfy29LI7fd2knWT294TPmbrYeoRqb4sQ76d+8RSJlgFpjkR8ejJT/aW3mzwO76YdJQXhuYM9JZx14whMIxWHi0Pje3/PgV7RfceyxbFs9dSaaZ5GYv8dvEsiIkTFgpEVdP45eL8VXj/6ErapjU2YYB9qzTgb+rvTPqqyP3GN3U6nd9Kd768DZvrzT6jCoua/m3lWnBiLFZXofOB9SomqaWv81VcUSIvr2uDpVl+onFBBx3C3RZM70PV5Jg="
- secure: "gYC5NDHZBMmTIPVzxXwZBFJ99UFnrnqN9YTNz3OxrN1qSrWi3g4nNhP2lyreKhaAg5IchYvHwjgktWYE25yCvsMLfaQQXw/2wCwRnEpcMDsVzZxVfExvy8bukhKlgKr8PXU+4mMTo1E+4b+HWdCTMQf0hKt6/7ccF8udY+VxXqQ6Kg9CrRSg3MtsMJR75rOUpJ2KgNG9N5GzCNl3hxwM+F7DpHEp0YstpAWqlugTHhsKGXEUfu/DGhRWfEmQnj0u8ra3qkjsRlanLcWdCfHR4lqPVuRRkeIP3QQkgJe283xVgt6t1sIUdMOSvoSqi+T469WI+nuO9ssPBikViQSc1P2vOay1p3dIx8PKmIvRlDr+fT5d8FvTafWCDMHOrAEJ3drkbjuMo/E3OXNq3QS8aXlFc17raa+gxihSQNVV1weyifng9+IO5JRoi1B9unOwuAl71Xt34uMAjCWJ2tZS/w4c5IPUaSlaXO4ULEgn0YEjxFnrroxBexFkWlgnT8wrjOg3JUOSbNSB1X81IoSEYiDg+Ddt/zn8lS0fQwAMvsuAODdY5EnMbLFDUKOEZxMl6GVAvDzp0LxGfzFLlHTGkPBy92Ox/59qRLXVvUcCn++Dl9TvnI5g8mSTcWjmDDHyTSShzfO/y/+aMc2mQ/OEYZ7u5o8qHOgeqFjrzHN72P0="
# The project committed the vendor directory into source so there is no need for
# travis to install dep and pull down dependencies.
# Therefore, the dep-X targets are commmented out here. Uncomment these if the project
# decided to no longer commit vendor dependencies into the source tree.
# See: https://github.com/golang/dep/blob/master/docs/FAQ.md#should-i-commit-my-vendor-directory
install:
- make swagger-install
#- make dep-install
#- make dep-update
script:
- if [ ! -z "$(gofmt -l ${GO_FILES})" ]; then echo "These files need to be formatted:" "$(gofmt -l ${GO_FILES})";echo "Diff files:"; gofmt -d ${GO_FILES}; exit 1; fi # Gofmt Linter
- make clean build test-race
- make swagger-travis
# Push the docker images to docker hub
# If a tag build, use the tag as docker version; otherwise, use branch name as docker version (where master==latest)
after_success:
- export COMMIT_HASH=${TRAVIS_COMMIT}
- export DOCKER_VERSION=$(if [ "$TRAVIS_TAG" != "" ]; then echo $TRAVIS_TAG; elif [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi)
- export DOCKER_USER=$(if [ "$DOCKER_USER" == "" ]; then echo "unknown"; else echo $DOCKER_USER ; fi)
- export DOCKER_PASS=$(if [ "$DOCKER_PASS" == "" ]; then echo "unknown"; else echo $DOCKER_PASS ; fi)
- echo DOCKER_VERSION=$DOCKER_VERSION
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
- make docker-build
- docker push kiali/kiali
# Build only the master branch (for "latest" release) and version tags (e.g. "v1.2.3" or "v1.1.2.RC2" or "v2.1.5.Final")
# Add branch names below if we want to push docker images built off of those branches.
branches:
only:
- master
- /^v(\d+\.){1,2}(\d+){1}(\.[a-zA-Z\d]+|\-snapshot.(\d))?$/