forked from cni-genie/CNI-Genie
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
37 lines (31 loc) · 1.07 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
sudo: required
language: go
go:
- 1.x
- 1.6
- 1.7.x
- master
# TODO (Karun): This works only if travis has k8s environment. Hence commenting it for now.
#install:
# - go get -v github.com/onsi/ginkgo/ginkgo
# - go get -v github.com/onsi/gomega
# - export PATH=$PATH:$HOME/gopath/bin
# TODO (Karun): This works only if travis has k8s environment. Hence commenting it for now.
# script: ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --compilers=2
services:
- docker
env:
global:
- REPO=quay.io/cnigenie/v1.5
after_success:
- docker --version
- echo 'Travis commit is:\n'
- echo $TRAVIS_COMMIT
- echo 'Travis Build Number is:\n'
- echo $TRAVIS_BUILD_NUMBER
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" quay.io/cnigenie/v1.5
- docker build -t cnigenie -f conf/1.5/Dockerfile .
- docker tag cnigenie:latest $REPO:$TAG
- docker tag cnigenie:latest $REPO:$TRAVIS_BUILD_NUMBER
- docker push $REPO