-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
144 lines (131 loc) · 3.96 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
notifications:
email: false
git:
quiet: true
depth: 2
env:
global:
- TERM=dumb
- secure: CPxhCfH647r50BaP+wecOlDyScz/VqjtI+j34A6YePvkhZ3K2xbWugBzrs2jEhxZV5Xdutd2feRNA5UCMndi0LqGZ/cr9B0YSp8XhlQzNSCwvD7H33DJMj1qRue2QcWVKFUAn4V5BHVBs11UE1kohxDEZ4jzcNCtjRICX5oNbSWDpwBO5iUTBHNp5lflzWbzN9tJHpA+GnHiKWQHHaDjBjFw7IKG5vV6QrGM/c+MN2iyOIJ7k1557E0txm+xmJxRxoC68/XGeodZxwdhcZBuLkJ+SO+FGj5Dx9aKp6S28ZkhH2VVWseA1SjwltTzGqK22HkGqOeMhzbadNsbh+cyPuHz4N2EUxtUJs1oay3apIxvrucQISS5F3oEjbn+ZZ/8NKS6IXKAm2femzxH7XglwpKZjGkA+8kuii/rC4bKnVo/cdrp0obkz0Nwtp11cMlX1yNi/pV12+8iI8/RF3/VnyHvpr9/jBhC+l6YurSAy5wLrD9UQwGjyeXFDb5+mPMyuYLJ6IsurkLZNkpRNjkiMOc0rDynfe/3U0tQpr/+x/AC5YweAAErH6KuJb1Lgh2fsfrJXf7MJNczv/uvG0Kj777XD1kIzyII5boelonEqZjrrgeK/msrwLPbWvNcv6gCziaQniIEpTbrR/R7FQe0IDyXSVBM4ENh9dHdNLWkA8A=
language: java
addons:
apt:
update: true
packages:
- jq
- tree
- curl
- bash
- sudo
- python-pip
- libxml2-utils
install: true
before_install:
- sudo pip -V
- sudo pip install --upgrade pip httpie >/dev/null 2>&1
- sudo pip -V
- http --version
#
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)
- stop_any 8080 3000 80 >/dev/null
#
- export root=$(pwd)
- ./mvnw
- ./gradlew -Dorg.gradle.jvmargs='-Xmx1g'
- ./gradlew --stop
stages:
- test
- deploy
jobs:
include:
- stage: test
jdk: openjdk8
name: gradle gradle-kotlin-dsl jdk8
script:
- cd ${root}/gradle-kotlin-dsl
# gradle
- ./gradlew --no-daemon
- java -jar build/libs/*-all.jar &
- wait_for 8080
- sleep 5
- curl http://localhost:8080/api/v1/hello/ | jq '.'
- curl http://localhost:8080/api/v1/hello/404 | jq '.'
- ./gradlew --stop
- stop_any 80 8080
- stage: test
jdk: openjdk8
name: maven gradle-kotlin-dsl jdk8
script:
- cd ${root}/gradle-kotlin-dsl
- ./mvnw
- java -jar target/*.jar &
- wait_for 8080
- sleep 5
- curl http://localhost:8080/api/v1/hello/ | jq '.'
- curl http://localhost:8080/api/v1/hello/404 | jq '.'
- stop_any 80 8080
- stage: test
jdk: openjdk8
name: maven-assembly jdk8
script:
- cd ${root}
- ./mvnw -pl maven-assembly
- java -jar maven-assembly/target/maven-assembly-*.jar &
- wait_for 8080
- sleep 3
- http :8080 | jq '.'
- http :8080/404 || true
- stop_any 80 8080
- stage: test
jdk: openjdk8
name: gradle updates jdk8
script:
- cd ${root}
- ./gradlew dependencyUpdates -Drevision=release
- ./gradlew dependencyUpdates -Drevision=release -b gradle-kotlin-dsl/build.gradle.kts
- stage: test
jdk: openjdk8
name: maven updates jdk8
script:
- cd ${root}
- ./mvnw versions:display-property-updates
- ./mvnw versions:display-property-updates -f ./maven-assembly/pom.xml
- ./mvnw versions:display-property-updates -f ./gradle-kotlin-dsl/pom.xml
- stage: deploy
jdk: openjdk8
name: GitHub release and GitHub pages deployment jdk8
script: skip
if: branch = "master" AND type NOT IN (pull_request)
before_deploy:
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ".$TRAVIS_BRANCH" != ".master" ] ; then exit 0 ; fi
- env
# publish tag release
- mkdir -p ${HOME}/.m2
- set -e
- cd ${root}
- ./gradlew documentation -Dorg.gradle.jvmargs='-Xmx1g'
- ./gradlew clean -Dorg.gradle.jvmargs='-Xmx1g'
- ./mvnw -Pdocs
- mkdir -p ./target/generated-docs
- cp -Rf ./target/generated-docs/index.html ./target/generated-docs/404.html
deploy:
provider: pages
skip-cleanup: true
# travis encrypt GITHUB_TOKEN=<your github repo token> --add
github-token: "$GITHUB_TOKEN"
keep-history: true
on:
branch: master
condition: "$TRAVIS_PULL_REQUEST = false"
local-dir: target/generated-docs
target_branch: gh-pages
before_cache:
- for item in $(find ~/.gradle -name "*.lock");
do sudo rm -rf $item ;
done
cache:
pip: true
packages: true
directories:
- $HOME/.m2
- $HOME/.gradle