-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (47 loc) · 1.56 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
46
47
48
49
50
51
52
53
54
sudo: required
services:
- docker
language: go
env:
global:
- DOCKER_VERSION=1.13.1-0~ubuntu-trusty
- DOCKER_COMPOSE_VERSION=1.11.2
before_install:
- apt-cache madison docker-engine
- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
- sudo rm -f /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- cp .env.test .env
script:
- docker version
- docker-compose version
- docker login -u="$DOCKER_USER" -p="$DOCKER_PWD" $DOCKER_REGISTRY
- docker build -t go_base -f docker/gobase.Dockerfile .;
- docker build -t popcube-docs -f docker/docs.Dockerfile .;
- docker-compose -f docker-compose.test.yml up --build;
- >-
docker-compose --file=docker-compose.test.yml ps -q | xargs docker inspect -f '{{ .State.ExitCode }}' | while read code; do
if [ "$code" != "0" ]; then
exit -1
fi
done
deploy:
# build-push develop to the staging environment
- provider: script
script: scripts/deploy.sh --branch=develop
on:
branch: develop
# build-push master to production
- provider: script
script: scripts/deploy.sh --branch=master
on:
branch: master
# build-push-deploy release to production
- provider: script
script: scripts/deploy.sh --tag=$TRAVIS_TAG --deploy=true
on:
tags: true
notifications:
slack: societyco:T1mHeYKrOtopvRjIZ68MqOQo