forked from relax/relax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 1.08 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
sudo: required
services:
- docker
notifications:
slack: relaxcms:Fr4KeA1SELAxxfd5H9acm2dX
before_install:
- curl -L https://releases.rancher.com/compose/v0.11.0-rc14/rancher-compose-linux-amd64-v0.11.0-rc14.tar.gz > rancher-compose.tar.gz
- tar -xvzf rancher-compose.tar.gz
- rm *.gz
- chmod +x rancher-compose-v0.11.0-rc14/rancher-compose
- sudo mv rancher-compose-v0.11.0-rc14/rancher-compose /usr/local/bin
- rm -r rancher-compose-v0.11.0-rc14
- docker build -t relax/relax .
- docker build -t relax/nginx docker/nginx
script:
- docker run relax/relax npm run eslint
- docker run relax/relax npm test
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push relax/relax;
docker push relax/nginx;
fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then
cd docker;
rancher-compose -f docker-compose-staging.yml --url http://rancher.getrelax.io --access-key $RANCHER_ACCESS_KEY --secret-key $RANCHER_SECRET_KEY -p relax up -d --confirm-upgrade --pull --force-upgrade;
fi