machine:
  services:
    - docker
dependencies:
  cache_directories:
    - "~/.m2"
  override:
    - docker info
    - docker build -f Dockerfile.builder -t portal-backend-builder .
    - docker run --rm -v $HOME/portal-backend:/build/ -v $HOME/.m2:/home/build/.m2/ portal-backend-builder:latest
    - docker build -t hbpmip/portal-backend .
test:
  pre:
    - ./tests/pre-test-run.sh
  override:
    - ./tests/test-run.sh
# deployment:
#   hub:
#     branch: master
#     commands:
#       - docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASS -e $DOCKER_HUB_EMAIL
#       - docker push --branch-tags=false --commit-tags=true
#       - mvn sonar:sonar -Dsonar.login=$SONAR_KEY  # Need SonarQube back on a public URL
