Add build docker image stage for travis

pull/148/head
johnniang 2019-05-09 15:00:04 +08:00
parent 3b888d3d89
commit 8f5f508b49
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