forked from docker-flow/docker-flow-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
21 lines (16 loc) · 810 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
env:
- VERSION=1.${TRAVIS_BUILD_NUMBER}
sudo: required
services:
- docker
script:
- docker run --rm -v $PWD:/usr/src/myapp -w /usr/src/myapp -v go:/go golang:1.6 bash -c "cd /usr/src/myapp && go get -d -v -t && go test --cover -v ./... --run UnitTest && go build -v -o docker-flow-proxy"
after_success:
- docker build -t vfarcic/docker-flow-proxy:${VERSION} .
- docker tag vfarcic/docker-flow-proxy:${VERSION} vfarcic/docker-flow-proxy
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD || false'
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && docker push vfarcic/docker-flow-proxy:${VERSION} || false'
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && docker push vfarcic/docker-flow-proxy || false'
branches:
only:
- master