forked from halo-dev/halo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (49 loc) · 1.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
language: java
jdk:
- oraclejdk8
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $TRAVIS_BUILD_DIR/build/libs/
dist: trusty
jobs:
include:
- stage: test
script: ./gradlew check
- stage: build
script: ./gradlew clean build -x test
- stage: Build Docker Image for Release
script: ./scripts/docker-build-release.sh
- stage: Build Docker Image for Dev
script: ./scripts/docker-build-dev.sh
- stage: GitHub Release
script: echo "Deploying to GitHub releases ..." && pwd
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: $TRAVIS_BUILD_DIR/build/libs/*
skip_cleanup: true
on:
tags: true
stages:
- test
- build
- name: GitHub Release
if: tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
- name: Build Docker Image for Release
if: tag =~ /^v\d+\.\d+(\.\d+)?(-release)?$/
- name: Build Docker Image for Dev
if: tag =~ /^v\d+\.\d+(\.\d+)?-(beta|alpha)+(\.\d+)?$/
branches:
only:
- master
- dev
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
notifications:
webhooks:
- https://fathomless-fjord-24024.herokuapp.com/notify