forked from openlabs/docker-wkhtmltopdf-aas
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
49 lines (41 loc) · 1.66 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
dist: trusty
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
directories:
- node_modules
services:
- docker
env:
global:
- CC_TEST_REPORTER_ID=c705634424a58e3c1f0acdaf16dbfc688397458c6f62c765f3827bacc98a77eb
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
before_install:
- sudo apt-get -qq update
- sudo apt-get install poppler-utils bash xfonts-75dpi xfonts-base
- sudo apt-get install -y libpng-dev
- sudo curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
- sudo bash nodesource_setup.sh
- sudo apt-get install nodejs
- sudo apt-get install -y libpng-dev
- wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
- sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
- yarn install
- docker build -t pdf-service .
- docker run -d -e USER='gooduser' -e PASS='secretpassword' -e PAYLOAD_LIMIT='50mb' -p 127.0.0.1:80:5555 --name pdf-service pdf-service
- docker ps | grep -q pdf-service
after_script:
- "npm run lint"
- if [ $TRAVIS_BRANCH = 'master' ]; then ./cc-test-reporter after-build --coverage-input-type lcov 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