jdk:
  - openjdk8

services:
  - docker

before_script:
  - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - docker run --rm -d -p="27017:27017" --name=mongo mongo:3.2
  - docker run --rm -d -p "3025:3025" -p "3143:3143" --name greenmail greenmail/standalone:1.5.7
  - docker run --rm -d -p "8080:8080" --name wiremock rodolpheche/wiremock

script:
  - ./sbt clean compile docker:publishLocal
  - docker run -d -p 9000:9000 --net=host sdkman/sdkman-website:1.0.0-SNAPSHOT
  - ./sbt test

after_success:
  - sbt docker:publish

after_script:
  - docker rm -f mongo wiremock greenmail

cache:
  directories:
    - "$HOME/.ivy2"
    - "$HOME/.sbt"

# blacklist
branches:
  except:
    - RELEASE

jdk:
  - openjdk8

services:
  - docker

before_script:
  - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - docker run --rm -d -p="27017:27017" --name=mongo mongo:3.2
  - docker run --rm -d -p "3025:3025" -p "3143:3143" --name greenmail greenmail/standalone:1.5.7
  - docker run --rm -d -p "8080:8080" --name wiremock rodolpheche/wiremock

script:
  - ./sbt clean compile docker:publishLocal
  - docker run -d -p 9000:9000 --net=host sdkman/sdkman-website:1.0.0-SNAPSHOT
  - ./sbt test

after_success:
  - ./sbt docker:publish

after_script:
  - docker rm -f mongo wiremock greenmail

cache:
  directories:
    - "$HOME/.ivy2"
    - "$HOME/.sbt"

# blacklist
branches:
  except:
    - RELEASE

Use sbt wrapper for publish on CI.
Use sbt wrapper for publish on CI.
