language: generic

cache:
  directories:
    - $HOME/.cache

sudo: required

services:
  - docker

env:
  - DOCKER_COMPOSE_VERSION=1.8.1

before_install:
  - mkdir -p $HOME/.cache
  - 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 --version
  - docker-compose version

script:
  # Make error if 'LICENSE(D) and IBM are found on a same line.'
  - sh -c "! egrep  -ri '(LICENSE[D]?).*(IBM)' --exclude='*.tar.gz' --exclude='.travis.yml' --exclude-dir='licenses' --exclude-dir='dockerhub' ."
  - chmod +x build.sh
  - ./build.sh
  - sudo service postgresql stop
  - while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done
  - export LICENSE=accept
  - docker-compose up -d
  - ./test/suite.sh

notifications:
  slack: ibm-cloud:LbtLkB6RShLAntBS4thdFlqY

language: generic

cache:
  directories:
    - $HOME/.cache

sudo: required

services:
  - docker

env:
  - DOCKER_COMPOSE_VERSION=1.8.1

before_install:
  - mkdir -p $HOME/.cache
  - 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 --version
  - docker-compose version

script:
  # Make error if 'LICENSE(D) and IBM are found on a same line.'
  - sh -c "! egrep  -ri '(LICENSE[D]?).*(IBM)' --exclude='*.tar.gz' --exclude='.travis.yml' --exclude-dir='licenses' --exclude=./welcomepage/src/main/webapp/index.jsp --exclude-dir='dockerhub' ."
  - chmod +x build.sh
  - ./build.sh
  - sudo service postgresql stop
  - while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done
  - export LICENSE=accept
  - docker-compose up -d
  - ./test/suite.sh

notifications:
  slack: ibm-cloud:LbtLkB6RShLAntBS4thdFlqY

Remove check license from index.jsp
Remove check license from index.jsp
