machine:
  services:
    - docker
  java:
    version: oraclejdk8

general:
  artifacts:
    - "backend/target/keep-watching-be.jar"

dependencies:
  cache_directories:
    - "~/docker"
  override:
    - mvn dependency:resolve -P db
    - docker info

test:
  override:
    - sh ./test.sh

deployment:
  release:
    branch: master
    commands:
      - sh ./build.sh
      - docker build --rm=false -t caladreas/keep-watching-be backend
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push caladreas/keep-watching-be
machine:
  pre:
    - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
  services:
    - docker
  java:
    version: oraclejdk8

general:
  artifacts:
    - "backend/target/keep-watching-be.jar"

dependencies:
  pre:
    - curl -L https://github.com/docker/compose/releases/download/1.8.0-rc2/docker-compose-`uname -s`-`uname -m` > ../bin/docker-compose && chmod +x ../bin/docker-compose
    - docker-compose pull
  override:
    - mvn dependency:resolve -P db
    - docker info

test:
  override:
    - sh ./test.sh

deployment:
  release:
    branch: master
    commands:
      - sh ./build.sh
      - docker build --rm=false -t caladreas/keep-watching-be backend
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push caladreas/keep-watching-be
Update docker version and add newer docker compose
Update docker version and add newer docker compose

