-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
49 lines (42 loc) · 1.72 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
sudo: required
language: node_js
node_js:
- 13
services:
- docker
before_install:
# install coveralls to push coverage to webpage
- npm install coveralls --no-save
# install heroku CLI
- wget -qO- https://toolbelt.heroku.com/install.sh | sh
# login to docker registries (dockerhub + heroku)
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- echo "$HEROKU_PASSWORD" | docker login -u "$HEROKU_USERNAME" --password-stdin registry.heroku.com
install:
# build dockerized environment to run tests
- docker-compose -f docker-compose.travis.yml build
after_success:
# submit results to coveralls, on success
- coveralls < coverage/lcov.info
script: docker-compose -f docker-compose.travis.yml up --abort-on-container-exit --exit-code-from app
deploy:
- provider: script
script:
# push to dockerhub & heroku
docker tag media_server:latest alejandrodaneri/media-node-chotuve:staging;
docker tag alejandrodaneri/media-node-chotuve:staging registry.heroku.com/$HEROKU_APP_NAME_STAGING/web;
docker push alejandrodaneri/media-node-chotuve:staging;
docker push registry.heroku.com/$HEROKU_APP_NAME_STAGING/web;
heroku container:release web --app $HEROKU_APP_NAME_STAGING
on:
branch: develop
- provider: script
script:
# push to dockerhub & heroku
docker tag media_server:latest alejandrodaneri/media-node-chotuve:production;
docker tag alejandrodaneri/media-node-chotuve:production registry.heroku.com/$HEROKU_APP_NAME/web;
docker push alejandrodaneri/media-node-chotuve:production;
docker push registry.heroku.com/$HEROKU_APP_NAME/web;
heroku container:release web --app $HEROKU_APP_NAME
on:
branch: master