-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
28 lines (22 loc) · 854 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
25
26
27
28
sudo: required #is required to use docker service in travis
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
- REPO=kamynina/pgtap
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=amd64
language: sql #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
script:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker build -t level-three-rest -t $REPO:$TAG -f Dockerfile .
after_success:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWD
- export REPO=kamynina/pgtap
- export TAG=`if [ "$TRAVIS_BRANCH" = "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker build -f Dockerfile -t $REPO:$TAG .
- docker push $REPO