forked from steemit/steem
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
45 lines (38 loc) · 1.22 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
sudo: required
language: cpp
services:
- docker
before_install:
- echo "$TRAVIS_TAG"
- echo "$TRAVIS_BRANCH"
env:
- DOCKERFILE=Dockerfile DOCKERNAME=""
- DOCKERFILE=share/vizd/docker/Dockerfile-test DOCKERNAME="-test"
- DOCKERFILE=share/vizd/docker/Dockerfile-testnet DOCKERNAME="-testnet"
- DOCKERFILE=share/vizd/docker/Dockerfile-lowmem DOCKERNAME="-lowmem"
- DOCKERFILE=share/vizd/docker/Dockerfile-mongo DOCKERNAME="-mongo"
matrix:
fast_finish: true
script:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
export DOCKERNAME="latest""$DOCKERNAME";
export EXPORTNAME="$DOCKERNAME";
elif [ -n "$TRAVIS_TAG" ]; then
export DOCKERNAME="$TRAVIS_TAG""$DOCKERNAME";
export EXPORTNAME="$DOCKERNAME";
else
export DOCKERNAME=develop"$DOCKERNAME";
fi
- echo "$DOCKERFILE"
- echo "$DOCKERNAME"
- docker build -t viz-world/viz-world:"$DOCKERNAME" -f "$DOCKERFILE" .
after_success:
- echo "$EXPORTNAME"
- docker images
- if [ -n "$EXPORTNAME" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push viz-world/viz-world:"$EXPORTNAME";
fi
- if [ "$TRAVIS_BRANCH" == "master" -a "$EXPORTNAME" == "latest" ]; then
bash deploy/deploy.sh;
fi