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