forked from docker-flow/docker-flow-swarm-listener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
24 lines (19 loc) · 937 Bytes
/
.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
env:
global:
- VERSION=1.${TRAVIS_BUILD_NUMBER}
- DOCKER_HUB_USER=vfarcic
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 "go get -d -v -t && go test --cover -v ./..."
- docker run --rm -v $PWD:/usr/src/myapp -w /usr/src/myapp -v go:/go golang:1.6 bash -c "go get -d -v -t && CGO_ENABLED=0 GOOS=linux go build -v -o docker-flow-swarm-listener"
- docker build -t vfarcic/docker-flow-swarm-listener .
after_success:
- docker tag vfarcic/docker-flow-swarm-listener vfarcic/docker-flow-swarm-listener:$VERSION
- docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && docker push vfarcic/docker-flow-swarm-listener:${VERSION} || false'
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && docker push vfarcic/docker-flow-swarm-listener || false'
branches:
only:
- master