From cf7b781b6de89519f33c35dda9527fb1cf22b117 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 18 Dec 2017 17:17:48 +0000 Subject: [PATCH] Docker Hub integration (#168) --- .editorconfig | 3 +++ .travis.yml | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9b7352176..4a874ce23 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,6 @@ trim_trailing_whitespace = true [*.md] max_line_length = off trim_trailing_whitespace = false + +[*.yml] +indent_size = 2 diff --git a/.travis.yml b/.travis.yml index 4eb7bfa76..1570c46bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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