Add build docker image stage for travis

pull/151/head
johnniang 2019-05-09 15:00:04 +08:00 committed by John Niang
parent dcca261951
commit 2f4b6b0d3a
1 changed files with 13 additions and 3 deletions

View File

@ -8,9 +8,19 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
script:
- ./gradlew check
- ./gradlew clean build -x test
dist: trusty
jobs:
include:
- stage: test
script: ./gradlew check
- stage: build
script: ./gradlew build -x test
- stage: build docker image
scrip:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t $DOCKER_USERNAME/halo .
- docker images
- docker push $DOCKER_USERNAME/halo
branches:
only:
- master