-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
150 lines (150 loc) · 4.98 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
145
146
147
148
149
150
git:
quiet: true
depth: false
env:
global:
- TERM=dumb
- secure: "q5Mthp+HKvg1uTwuOxlwgUsmESTZEpC2y/dLCeVyeg1gHh2XZ7F/o34IT9let2IjL97NyQGWs+KuvjEnfBhvwjKqAcBzZz5aHJok98zD9N/qwqgxw17tp3dXiDRSk9fN0a7i8V5i2najGQDBumo1IuVrWSmhPcV2aI3Hl2Kfzd0uZTsJRUsqvuunJYdOef/UcLdk2myFiXsG9MwdyqIiAKIjAH9oh913K+1LqDreoN6QzzGZ931Mvr90uOUs3B8V/3bdgLjSpkg8beXA51d1FgqaJE7OlwQ2E0CHux/1pq61WLLCG/m5HL0C5VIsR4X1Yei7owp0w5Z3A6D1kHGDIfrL3Fw5umQwEOTur1UBAeocciCqBj4RNYHEQhRYt3mUcwAz+pMgFspVkkSKaRGIoULObkhcM56VOKElP+DhnG9HPTx5LtKBxtbSt+/GTDc9K7CX5BJnrp+6uWe4t++lWciyZ9q4TOINi3DMjmAzpt9V7QNl5JxciZIowPMd2AsE6U18DUoMjxCjBIEAtWSJNnH2Sfa6zgp5UYvBngOGiSwbwJiZqnw9nlebQDPic/ywMlI7Pfawrt9goCq4s5ueycW7V41N54uAU/WurqgymgzBEtNzPVxJkQ/FrgfjO7A6zm/kz6fG78fVV4uHbckCk1rb9enBVsIpEuljgHgHawI="
language: java
service:
- docker
addons:
apt:
update: true
packages:
- jq
- sudo
- lsof
- wget
- bash
- curl
- unzip
- docker-ce
- python3-dev
- python3-pip
- python3-six
- libxml2-utils
- python3-setuptools
install: true
before_install:
- docker-compose -v
- export PATH=$HOME/.local/bin:$PATH
- echo "pip3 location $(which pip3) and pip3 version $($(which pip3) -V)"
- $(which pip3) install --user $(whoami) --upgrade pip >/dev/null # pip3 -> pip
- echo "pip3 location $(which pip3) and pip3 version $($(which pip3) -V)"
- $(which pip3) install --user $(whoami) --upgrade pip >/dev/null
- echo "pip3 location $(which pip3) and pip3 version $($(which pip3) -V)"
- $(which pip3) install --user $(whoami) --upgrade docker-compose httpie >/dev/null
- http --version
- docker-compose -v
#
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)
- stop_any 80 8001 8002 8080 5432
stages:
- test
- deploy
jobs:
include:
- stage: test
jdk: openjdk8
name: jdk8 maven integration test
script:
- ./mvnw
- ./mvnw -Pdocker docker-compose:up
- docker logs -f thymeleaf-ee_thymeleaf-ee-app_1 &
- while [[ $(docker ps -lqf health=healthy | wc -l) -lt 1 ]] ; do echo -ne '.' ; sleep 3s ; done
- http :8080/app/api/health | jq '.'
- http :8080/app/api/ | jq '.'
- http :8080/app/
- ./mvnw -Pdocker docker-compose:down >/dev/null
- stage: test
jdk: openjdk11
name: jdk11 maven integration test
script:
- ./mvnw
- ./mvnw -Pdocker docker-compose:up
- docker logs -f thymeleaf-ee_thymeleaf-ee-app_1 &
- while [[ $(docker ps -lqf health=healthy | wc -l) -lt 1 ]] ; do echo -ne '.' ; sleep 3s ; done
- http :8080/app/api/health | jq '.'
- http :8080/app/api/ | jq '.'
- http :8080/app/
- ./mvnw -Pdocker docker-compose:down >/dev/null
- stage: test
jdk: openjdk8
name: jdk8 gradle integration test
script:
- ./gradlew clean composeUp
- docker logs -f thymeleaf-ee_thymeleaf-ee-app_1 &
- http :8080/app/
- http :8080/app/api/ | jq '.'
- http :8080/app/api/health | jq '.'
- ./gradlew composeDown >/dev/null
- ./gradlew --stop >/dev/null
- stage: test
jdk: openjdk11
name: jdk11 gradle integration test
script:
- ./gradlew clean composeUp
- docker logs -f thymeleaf-ee_thymeleaf-ee-app_1 &
- http :8080/app/
- http :8080/app/api/ | jq '.'
- http :8080/app/api/health | jq '.'
- ./gradlew composeDown >/dev/null
- ./gradlew --stop >/dev/null
- stage: test
jdk: openjdk11
name: jdk11 maven updates
script: ./mvnw versions:display-property-updates
- stage: test
jdk: openjdk11
name: jdk11 gradle updates
script: ./gradlew dependencyUpdates -Drevision=release
- stage: test
jdk: openjdk8
name: jdk8 gradle documentation
script: ./gradlew documentation
- stage: test
jdk: openjdk11
name: jdk11 gradle documentation
script: ./gradlew documentation
- stage: test
jdk: openjdk8
name: jdk8 maven documentation
script: ./mvnw -Pdocs
- stage: test
jdk: openjdk11
name: jdk11 maven documentation
script: ./mvnw -Pdocs
- stage: deploy
jdk: openjdk8
rvm: 2.6.4
name: GitHub release and GitHub pages deployment
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
- set -e
- ./gradlew documentation
#- ./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
local-dir: target/generated-docs
target_branch: gh-pages
before_cache:
- find ~/.gradle -name '*.lock' -type f -print0 | xargs -0 sudo rm -rfv '{}'
- find ~/.gradle -name 'plugin-resolution' -type d -print0 | xargs -0 sudo rm -rfv '{}'
cache:
pip: true
packages: true
directories:
- ~/.docker
- ~/.gradle
- ~/.m2