-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (45 loc) · 1.29 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
55
56
57
language: node_js
node_js: 'node'
before_install:
- stty cols 80
dist: trusty
sudo: required
install:
- npm install
cache:
directories:
- "node_modules"
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.14.0
- COMMIT=${TRAVIS_COMMIT::8}
- MAIN_REPO=ssh://[email protected]/muxer-dev/muxer-client.git
- CLIENT=my-dev-space-client
- CLIENT_REPO=${MAIN_REPO}#${TRAVIS_BRANCH}:services/client
- CLIENT_DIR=services/client
before_install:
- sudo rm /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
before_script:
- export TEST_URL=http://127.0.0.1
- export REACT_APP_EVENTS_SERVICE_URL=http://127.0.0.1
- export SECRET_KEY=my_precious
- export DISPLAY=:99.0
- export DOCKER_ENV=$(if [ "$TRAVIS_BRANCH" == "production" ]; then echo "prod"; else echo "stage"; fi)
- sh -e /etc/init.d/xvfb start
script:
- bash ./scripts/test.sh $DOCKER_ENV
after_success:
- bash ./scripts/docker-push.sh
- bash ./scripts/docker-deploy-stage.sh
- bash ./scripts/docker-deploy-prod.sh