Docker Hub integration (#168)

This commit is contained in:
Denys Vuika 2017-12-18 17:17:48 +00:00 committed by GitHub
parent 5dea44c342
commit cf7b781b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View File

@ -11,3 +11,6 @@ trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
[*.yml]
indent_size = 2

View File

@ -1,5 +1,5 @@
dist: trusty
sudo: false
sudo: required
language: node_js
node_js:
@ -9,9 +9,10 @@ cache:
directories:
- ./node_modules
services:
- docker
before_install:
- export CHROME_BIN=chromium-browser
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
@ -19,8 +20,17 @@ install:
- npm install
script:
- xvfb-run -a npm run test -- --single-run --no-progress --browser=ChromeNoSandbox
- npm run build:dev
- npm run test -- --single-run --no-progress --browser=ChromeNoSandbox
# Send coverage data to codecov
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov
- bash <(curl -s https://codecov.io/bash) -X gcov
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- export TAG=`if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH ; fi`
- docker build -t $DOCKER_REPO:$TAG .
# Publish extra image based on Travis build number
- docker tag $DOCKER_REPO:$TAG $DOCKER_REPO:travis-$TRAVIS_BUILD_NUMBER
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker push $DOCKER_REPO