-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
291 lines (291 loc) · 10.9 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
env:
global:
- TERM=dumb
- secure: uBVw9ouBYZOBGwUoeotrvMYLbJbj3qL5VwYfAZvny2Cc5f9G4kUlSEEh6eMysGxnhPfftRV29GUfzTkuKeAGUa93+TqutkgoRbI6Lkyjd3Tmzj0xcjSFWWTYPXNJ1jf0LDIZhxYnchFtCNfd1AtldiC4Cx/vrXV35LY0FYpoy8cHE+lxjLQYhd4YiTL+j7wAznvjJiSO1mJ+Kswj00wCD7x9XfX9nEnp/bgsPua/s+iCX+PKk4R2YQKAqGlZ1xV7+rQHG8x0zqwX83yV3gh0QMd33CeMdNnt+258bEVj5/CtlnT+EjbjhH+eXSTnWDJObcrWO8d9dfZlwUHyeAhMy039ANRUmdrL6wurAHvcTUYbRZHRVbTEJkx0wWPmvtQ90OIz0cO3ckWZ7VSLq/XZcKBv+6UPEXXE/qmevIQinf8Y+sdexgXOYQbJKpmUjoyNvTUh683LeP1MjgmAYqbOGFuL6WUuIEtF6nZP5TY6LBYxcnSphg6rjPtpwUF/VFoRAR+oFoqdCqjoxK9RHT7GPHOltOun0I2dL0CVfWSLM84B3tBQzwIEz+hhgYty21cT2eltZpR1suAh9YW5HSWY6VF/kNtNLMlCO/rB1RwJh9IUSNeWnJesRy5i0h8J3HkD8/ivGYkqn2KtWaVlOSTbUj8afVMt0/jeWe+9pewipJc=
notifications:
email: false
git:
quiet: true
depth: false
jdk: openjdk8
node_js: lts/*
python: 3.8
services: docker
addons:
apt:
update: true
packages:
- docker-compose
- libxml2-utils
- docker-ce
- httpie
- bash
- sudo
- lsof
- curl
- jq
install: true
before_install:
- |
if [ ! -f ${HOME}/.local/daggerok/bash-functions/master/main.bash ] ; then
mkdir -p ${HOME}/.local/daggerok/bash-functions/master ;
curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash > ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
fi
source ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
- stop_any 5432 5672 27017 8080 80 5432 8080 8081 8082 8083 8084 8085 8086 8087 8088
#
- docker-compose version
jobs:
include:
- stage: test
name: java-ee-dwr-example
script:
- cd $TRAVIS_BUILD_DIR/java-ee-dwr-example && ./mvnw
- stage: test
name: aop-logger
script:
- cd $TRAVIS_BUILD_DIR/aop-logger
- ./gradlew
- ./gradlew composeUp
- docker logs -f aop-logger_gradle-aop-logger-app_1 &
- http :8080/app/api/
- http :8080/app/api/health
- http :8080/app/api/ping
- http :8080/app/api/pong
- ./gradlew composeDown
- stage: test
name: porcupine-bulkhead-jee8
script:
- cd $TRAVIS_BUILD_DIR/porcupine-bulkhead-jee8
- ./gradlew
- ./gradlew composeUp
- http :8080/app/async-items/write1 value=ololo
- http :8080/app/async-items/write2 value=trololo
- http :8080/app/async-items/read1
- http :8080/app/async-items/read1/1
- http :8080/app/async-items/read2
- http :8080/app/async-items/read2/3 || true
- ./gradlew composeDown
- stage: test
name: async-jax-rs-resources
script:
- cd $TRAVIS_BUILD_DIR/async-jax-rs-resources
- ./gradlew
- ./gradlew composeUp
- http :8080/app/items value=ololo
- http :8080/app/items value=trololo
- http :8080/app/items/
- http :8080/app/items/1
- http :8080/app/items/2
- http :8080/app/items/3 || true
- ./gradlew composeDown
- stage: test
name: kumuluzee-mp-2.0-jax-ws
script:
- cd $TRAVIS_BUILD_DIR/kumuluzee-mp-2.0-jax-ws
- bash mvnw clean package
- java -jar ./target/*.jar &
#- wait_for 8000
- sleep 15
- http :8000/
- http :8000/api/v1/ws
- http :8000/api/v1/ws\?wsdl
- curl -XPOST http://localhost:8000/api/v1/ws --header "content-type:text/xml" -d @./request.xml | xmllint --format -
- stop_any 80 8000
- docker-compose build --force-rm --no-cache --pull
- docker-compose up &
- sleep 35
- http :8000
- curl -sS 127.0.0.1:8000/api/v1/ws | xmllint --format -
- curl -sS "127.0.0.1:8000/api/v1/ws?WSDL" | xmllint --format -
- curl -XPOST http://127.0.0.1:8000/api/v1/ws --header "content-type:text/xml" -d @./request.xml | xmllint --format -
- curl -XPOST http://127.0.0.1:8000/api/v1/ws --header "content-type:text/xml" -d @./request.xml | xmllint --format - | grep id
- curl -XPOST http://127.0.0.1:8000/api/v1/ws --header "content-type:text/xml" -d @./request.xml | xmllint --format - | grep id
- curl -XPOST http://127.0.0.1:8000/api/v1/ws --header "content-type:text/xml" -d @./request.xml | xmllint --format - | grep id
- docker-compose down -v
- stop_any 80 8000
- stage: test
name: faces maven
script:
- cd $TRAVIS_BUILD_DIR/spring-faces
- bash ./mvnw
- bash ./mvnw clean package com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:up
- docker logs -f springfaces_maven-spring-faces-app_1 &
- sleep 40
- http :8080/app/
- bash ./mvnw com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:down
- stage: test
name: kotlin-kafka
script:
- cd $TRAVIS_BUILD_DIR/kotlin-kafka
- wget -q -O kafka.jar https://github.com/daggerok/embedded-kafka/raw/mvn-repo/embedded-kafka-0.0.3-all.jar
- >
java -jar kafka.jar \
--zookeeperPort=2181 \
--zookeeperDir=/tmp \
--kafkaPort=9092 \
--kafkaTopics=topic1,topic2 \
--httpPort=8081 \
--httpContext=/ &
- ./gradlew >/dev/null
- wait_for 9092 8081 2181
- java -Djava.net.preferIPv4Stack=true -jar build/libs/*-swarm.jar &
- wait_for 8080
- sleep 15
- http :8080/kafka/query
- http :8080/kafka/produce
- http :8080/kafka/produce
- stop_any 8080 8080 9092 2181 80
- sudo killall -9 java
# - stage: test
# name: kotlin-swarm
# cache: false
# script:
# - cd $TRAVIS_BUILD_DIR/kotlin-swarm && ./mvnw >/dev/null
# - cd $TRAVIS_BUILD_DIR/kotlin-swarm && ./mvnw com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:up
# - sleep 25
# - http :8080
# - http :8080/health
# - cd $TRAVIS_BUILD_DIR/kotlin-swarm && ./mvnw com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:down
# #
# - cd $TRAVIS_BUILD_DIR/kotlin-swarm && ./gradlew composeUp || true
# - sleep 25
# - http :8080
# - http :8080/health
# - cd $TRAVIS_BUILD_DIR/kotlin-swarm && ./gradlew composeDown || true
# #
# - cd $TRAVIS_BUILD_DIR/kotlin-swarm && ./mvnw
# - docker-compose -f docker-compose-maven.yaml build
# - docker-compose -f docker-compose-maven.yaml up &
# - sleep 40
# - http :8080
# - http :8080/health
# - docker-compose -f docker-compose-maven.yaml down -v
# - stop_any 8080 80
- stage: test
name: jboss-eap-h2-cdi
script:
- cd $TRAVIS_BUILD_DIR/jboss-eap-h2-cdi
- bash mvnw
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- sleep 20
- http post :8080/client/update/max
- http post :8080/client/update/maxp
- http post :8080/client/update/amaxp
- http :8080/client/
- http post :8080/client/update/max\?remove=true
- http :8080/client/
- docker-compose down -v --rmi local
- stage: test
name: jboss-eap-h2-ejb
script:
- cd $TRAVIS_BUILD_DIR/jboss-eap-h2-ejb
- bash mvnw
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- sleep 20
- http post :8080/client/update/max
- http post :8080/client/update/maxp
- http post :8080/client/update/amaxp
- http :8080/client/
- http post :8080/client/update/max\?remove=true
- http :8080/client/
- docker-compose down -v --rmi local
- stage: test
name: ejb-stateful-singleton
script:
- cd $TRAVIS_BUILD_DIR/ejb-stateful-singleton
- bash mvnw
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- sleep 20
- http :8080/client/
- http :8080/client/get\?key=EJB
- http :8080/client/set\?key=EJB\&value=some-value
- http :8080/client/get\?key=EJB
- http post :8080/client/counter/incr
- http post :8080/client/counter/increment
- http post :8080/client/counter/decr
- http post :8080/client/counter/incr
- http :8080/client/get\?key=EJB
- http post :8080/client/reset
- docker-compose down -v
- stage: test
name: xmlrpc
script:
- cd $TRAVIS_BUILD_DIR/xmlrpc
- bash mvnw clean package -U -T 4
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- sleep 30
- http :8080/client/v1/greet/Max
- docker-compose down -v --rmi local
## ext.js
#- >
# for path in \
# tomee-ext.js \
# glassfish-ext.js \
# jboss-eap-ext.js \
# ; do
# cd $TRAVIS_BUILD_DIR/${path}
# bash mvnw clean package -U -T 4
# stop_any 8080
# docker-compose build --force-rm --pull --no-cache
# docker-compose up -d --build --remove-orphans
# sleep 30
# http :8080/ui/
# http :8080/rest-api/health
# docker-compose down -v
# done
## forge-javaee-6-ws
#- cd $TRAVIS_BUILD_DIR/forge-javaee-6-ws
#- bash mvnw clean package -U -T 2
#- docker-compose up --build --force-recreate --remove-orphans -d
#- sleep 20
#- http :8080/app/health
#- http :8080/app/AppEndpoint\?wsdl
#- curl -XPOST http://localhost:8080/app/AppEndpoint --header "content-type:text/xml" -d @request.xml | xmllint --format -
#- docker-compose down -v
- stage: test
name: forge-ws
script:
- cd $TRAVIS_BUILD_DIR/forge-ws
- bash mvnw clean package -U
- bash gradlew clean build
- docker-compose up --build --force-recreate --remove-orphans -d
- sleep 20
- http :8080/app/v1/api
- http ":8080/app/UserService?wsdl"
- curl -XPOST http://localhost:8080/app/User --header "content-type:text/xml" -d @./src/test/resources/empty-request.xml | xmllint --format -
- curl -XPOST http://localhost:8080/app/User --header "content-type:text/xml" -d @src/test/resources/named-request.xml | xmllint --format -
- docker-compose down -v
- stage: deploy
name: Deploy docs
script: skip
if: branch = "master" AND type NOT IN (pull_request)
before_deploy:
- set -e
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ".$TRAVIS_BRANCH" != ".master" ] ; then exit 0 ; fi
- cd $TRAVIS_BUILD_DIR && ./mvnw
deploy: &pages
provider: pages
skip-cleanup: true
keep-history: true
target_branch: gh-pages
# travis encrypt GITHUB_TOKEN=<your github repo token>
github-token: "$GITHUB_TOKEN"
local-dir: $TRAVIS_BUILD_DIR/target/generated-docs
on:
branch: master
before_cache:
#- sudo rm -rf $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
- find ~/.gradle -name "fileHashes.bin" -print0 | xargs -0 rm -rfv '{}'
- for item in $(find ~/.gradle -name "*.lock") ; do rm -rfv $item ; done
cache:
packages: true
directories:
- ~/.m2
- ~/.gradle
- ~/.docker
- ~/.local/daggerok