language: java

jdk:
  - oraclejdk8

cache:
  directories:
    - $HOME/.m2

env:
  - DOCKER_COMPOSE_VERSION=1.24.0

install: mvn install -B

before_script:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - docker-compose up -d
  - sleep 200

script:
  - cd int-tests
  - mvn test -B

after_failure:
  - docker-compose logs

after_success:
  - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
    if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
      docker push nels/trackfind:latest;
    fi;
    if [ -n "$TRAVIS_TAG" ]; then
      docker tag nels/trackfind:latest nels/trackfind:$TRAVIS_TAG;
      docker push nels/trackfind:$TRAVIS_TAG;
    fi

dist: trusty

language: java

jdk:
  - oraclejdk8

cache:
  directories:
    - $HOME/.m2

env:
  - DOCKER_COMPOSE_VERSION=1.24.0

install: mvn install -B

before_script:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - docker-compose up -d
  - sleep 200

script:
  - cd int-tests
  - mvn test -B

after_failure:
  - docker-compose logs

after_success:
  - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
    if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
      docker push nels/trackfind:latest;
    fi;
    if [ -n "$TRAVIS_TAG" ]; then
      docker tag nels/trackfind:latest nels/trackfind:$TRAVIS_TAG;
      docker push nels/trackfind:$TRAVIS_TAG;
    fi

Add "dist: trusty" to fix Travis issues
Add "dist: trusty" to fix Travis issues
