forked from openlabs/docker-wkhtmltopdf-aas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (32 loc) · 1.27 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
sudo: required
dist: trusty
language: node_js
node_js:
- '6.1'
- '7.0'
cache:
directories:
- node_modules
services:
- docker
addons:
code_climate:
repo_token: 9f540c85650543fb2a8265032f9b15963b527ae3c66ae359e209ea6dcb745823
before_install:
- sudo apt-get -qq update
- sudo apt-get install poppler-utils bash xfonts-75dpi
- wget -q https://downloads.wkhtmltopdf.org/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
- sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
- "npm install -g mocha coffee-script ibrik codeclimate-test-reporter"
- "npm install"
- docker build -t pdf-service .
- docker run -d -e USER='gooduser' -e PASS='secretpassword' -p 127.0.0.1:80:5555 --name pdf-service pdf-service
- docker ps | grep -q pdf-service
after_script:
- if [ $TRAVIS_BRANCH = 'master' ]; then codeclimate-test-reporter < coverage/lcov.info; fi
- wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
- heroku plugins:install heroku-container-registry
- echo "machine api.heroku.com login ${HEROKU_EMAIL} password ${HEROKU_AUTH_TOKEN}" >> ${HOME}/.netrc
- chmod 0600 ${HOME}/.netrc
- docker login --email=_ --username=_ --password=$(heroku auth:token) registry.heroku.com
- heroku container:push web --app docker-wkhtmltopdf-aas