sudo: required

language: java
jdk:
  - openjdk8
node_js: "8.11.3"

services:
  - docker

after_success:
  - if [ "$TRAVIS_BRANCH" == "master" ]; then
    mvn -B -q -Pprod package docker:build;
    docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
    docker push microcks/microcks:latest;
    fi
  - if [ "$TRAVIS_BRANCH" == "0.9.0" ]; then
    mvn -B -q -Pprod -DskipTests package docker:build;
    docker tag microcks/microcks microcks/microcks:nightly;
    docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
    docker push microcks/microcks:nightly;
    fi
  - if [ "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then
    mvn -B -q -Pprod package docker:build;
    docker tag microcks/microcks microcks/microcks:$TRAVIS_TAG;
    docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
    docker push microcks/microcks:$TRAVIS_TAG;
    fi

sudo: required

language: java
jdk:
  - openjdk8
node_js: "8.11.3"

services:
  - docker

after_success:
  - if [ "$TRAVIS_BRANCH" == "master" ]; then
    mvn -B -q -Pprod package docker:build;
    docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
    docker push microcks/microcks:latest;
    fi
  - if [ "$TRAVIS_BRANCH" == "0.9.x" ]; then
    mvn -B -q -Pprod -DskipTests package docker:build;
    docker tag microcks/microcks microcks/microcks:nightly;
    docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
    docker push microcks/microcks:nightly;
    fi
  - if [ "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then
    mvn -B -q -Pprod package docker:build;
    docker tag microcks/microcks microcks/microcks:$TRAVIS_TAG;
    docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
    docker push microcks/microcks:$TRAVIS_TAG;
    fi

Rename 0.9.0 branch into 0.9.x
Rename 0.9.0 branch into 0.9.x
