# docker box definition
box: ekholabs/wercker-jdk8-go

# defining the build pipeline
build:
  steps:
    - script:
        name: show base information
        code: |
            echo $WERCKER_GIT_BRANCH
            echo $JAVA_HOME
            java -version
            javac -version
            gradle -v
    - script:
        name: Export Java Home
        code: |
            export JAVA_HOME=/usr/lib/jvm/java-8-oracle
            export CI_BRANCH=$WERCKER_GIT_BRANCH
    - script:
        name: Gradle Build
        code: |
            gradle clean build jacocoRootReport coveralls check shadowJar
  after-steps:
    - internal/store-container

# defining the release pipeline
release:
  steps:
    - script:
        name: Define TAG env variable
        code: |
            export TAG=`cat tag`
    - github-create-release:
        token: $GITHUB_TOKEN
        title: Health Checks version $TAG
        tag: $TAG
    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: build/libs/health-checks-$TAG-SNAPSHOT-all.jar

# docker box definition
box: hartwigmedical/wercker-jdk8-go

# defining the build pipeline
build:
  steps:
    - script:
        name: show base information
        code: |
            echo $WERCKER_GIT_BRANCH
            echo $JAVA_HOME
            java -version
            javac -version
            gradle -v
    - script:
        name: Export Java Home
        code: |
            export JAVA_HOME=/usr/lib/jvm/java-8-oracle
            export CI_BRANCH=$WERCKER_GIT_BRANCH
    - script:
        name: Gradle Build
        code: |
            gradle clean build jacocoRootReport coveralls check shadowJar
  after-steps:
    - internal/store-container

# defining the release pipeline
release:
  steps:
    - script:
        name: Define TAG env variable
        code: |
            export TAG=`cat tag`
    - github-create-release:
        token: $GITHUB_TOKEN
        title: Health Checks version $TAG
        tag: $TAG
    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: build/libs/health-checks-$TAG-SNAPSHOT-all.jar

Switch docker image to hartwigmedical
Switch docker image to hartwigmedical
