language: java
sudo: false
jdk:
  - oraclejdk8
cache:
  directories:
  - $HOME/.cache/bower
  - $HOME/.gradle
  - $HOME/.npm
  - .gradle

# some npm modules need a newer g++ compiler
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-6
    - g++-6
env:
  - CXX=g++-6

language: java

sudo: required

jdk:
  - oraclejdk8

services:
  - docker

# some npm modules need a newer g++ compiler
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-6
    - g++-6
env:
  - CXX=g++-6

cache:
  directories:
  - $HOME/.cache/bower
  - $HOME/.gradle
  - $HOME/.npm
  - .gradle

script:
  - ./gradlew assemble check &&
    docker build -t georocket/georocket-website . &&
    if [ "$TRAVIS_REPO_SLUG" == "georocket/georocket-website" ] && ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
    docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
    docker push georocket/georocket-website;
    fi

Build docker image on CI server and push it to registry
Build docker image on CI server and push it to registry
