-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
461 lines (461 loc) · 17.6 KB
/
.travis.yml
File metadata and controls
461 lines (461 loc) · 17.6 KB
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
notifications:
email: false
git:
quiet: true
depth: false
jdk: openjdk8
node_js: lts/*
python: 3.8
services: docker
os: linux
arch: amd64
addons:
apt:
update: true
packages:
- docker-ce
- httpie
- 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 80 8001 8002 8080 5432
- docker-compose version
jobs:
include:
- stage: test
name: start-xml-java8
env:
- SUB_PROJECT="$TRAVIS_BUILD_DIR/start-xml-java8"
before_script:
- cd $SUB_PROJECT && ./mvnw
- cd $SUB_PROJECT && ./gradlew
- cd $SUB_PROJECT && docker-compose up --build --force-recreate --remove-orphans &
- wait_healthy_docker_containers 2
script:
- http :8080/app/
- http :8080/app/hello
- http :8080/app/customers/list
#
- http :8081/app/
- http :8081/app/hello
- http :8081/app/customers/list
after_script:
- cd $SUB_PROJECT && docker-compose down -v --rmi local
# - stage: test
# name: start-xml-java7
# env:
# - SUB_PROJECT="$TRAVIS_BUILD_DIR/start-xml-java7"
# before_script:
# - cd $SUB_PROJECT && ./mvnw
# - cd $SUB_PROJECT && ./gradlew
# - cd $SUB_PROJECT && docker-compose up --build --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 2
# script:
# - http :8080/app/
# - http :8080/app/hello
# - http :8080/app/customers/list
# #
# - http :8081/app/
# - http :8081/app/hello
# - http :8081/app/customers/list
# after_script:
# - cd $SUB_PROJECT && docker-compose down -v --rmi local
- stage: test
name: my-chat docker-compose
script:
- cd $TRAVIS_BUILD_DIR/my-chat
- bash mvnw >/dev/null
- bash gradlew >/dev/null
- docker-compose up --build --force-recreate --remove-orphans &
- wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
- http :8080/my-chat/
- docker-compose down -v
- stop_any 8080 80
- stage: test
name: struts-2.5.22-jboss-eap-7.2-jdk-8-example maven docker-compose test
script:
- cd $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example && ./mvnw
- docker-compose -f $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example/.mvn/docker-compose.yaml up --build --force-recreate --remove-orphans &
- wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
- http :8080/webapp/
- http :8080/webapp/customers/list
- docker-compose -f $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example/.mvn/docker-compose.yaml down -v --rmi local
# - stage: test
# name: struts-2.5.22-jboss-eap-7.2-jdk-8-example maven versions display
# script: cd $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example && ./mvnw versions:display-property-updates -U
# - stage: test
# name: struts-2.5.22-jboss-eap-7.2-jdk-8-example gradle docker-compose test
# script:
# - cd $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example && ./gradlew >/dev/null
# - cd $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example && ./gradlew --stop >/dev/null
# - docker-compose -f $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example/gradle/docker-compose.yaml up --build --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - http :8080/webapp/customers/list
# - docker-compose -f $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example/gradle/docker-compose.yaml down -v --rmi local
# - stage: test
# name: struts-2.5.22-jboss-eap-7.2-jdk-8-example gradle dependency updates
# script: cd $TRAVIS_BUILD_DIR/struts-2.5.22-jboss-eap-7.2-jdk-8-example && ./gradlew dependencyUpdates -Drevision=release
- stage: test
name: using-conventions-struts-2.3.35 gretty (gradle jetty)
before_script:
- cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./gradlew
- cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./gradlew jettyStart &
- wait_for 8080
script:
- http :8080/webapp/
- http :8080/webapp/hello
- http :8080/webapp/customers/list
after_script:
- ./gradlew jettyStop
- stage: test
name: using-conventions-struts-2.3.35 maven-jetty-plugin
before_script:
- cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./mvnw
- cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./mvnw -f webapp jetty:run &
- wait_for 8080
script:
- http :8080/webapp/
- http :8080/webapp/hello
- http :8080/webapp/customers/list
after_script:
- cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./mvnw -f webapp jetty:stop
# - stage: test
# name: using-conventions-struts-2.3.35 docker-compose
# before_script:
# - cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./gradlew
# - cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./mvnw
# #
# - docker-compose down -v --rmi local
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up &
# - wait_healthy_docker_containers 2 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# script:
# - http :8080/webapp/
# - http :8080/webapp/hello
# - http :8080/webapp/customers/list
# #
# - http :8081/webapp/
# - http :8081/webapp/hello
# - http :8081/webapp/customers/list
# after_script:
# - docker-compose down -v --rmi local
- stage: test
name: using-conventions-struts-2.3.35 gradle updates
script: cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./gradlew dependencyUpdates -Drevision=release
- stage: test
name: using-conventions-struts-2.3.35 maven updates
script: cd $TRAVIS_BUILD_DIR/using-conventions-struts-2.3.35 && ./mvnw versions:display-property-updates
# - stage: test
# name: struts2dolist test
# script:
# - cd $TRAVIS_BUILD_DIR/struts2dolist/
# - ./mvnw >/dev/null
# - for i in $(docker ps -aq) ; do docker rm -f -v $i ; done
# - ./mvnw -pl :docker docker-compose:up
# - docker logs -f -t docker_site_1 &
# - wait_healthy_docker_containers 1
# - http :8080/site/
# - http :8080/site/
# - http :8080/site/
# - ./mvnw -pl :docker docker-compose:down >/dev/null
- stage: test
name: struts-rest-plugin maven jetty run
script:
- cd $TRAVIS_BUILD_DIR/struts-rest-plugin
- ./mvnw >/dev/null
- ./mvnw -pl webapp jetty:run &
- wait_for 8080
- http :8080/user.json
- http :8080/user.xml
- stop_any 8080 80
- ./gradlew >/dev/null
#- (./gradlew jettyRun) &
#- sleep 35
#- http :8080/user.xml
#- http :8080/user.json
#- stop_any 8080 80
# - stage: test
# name: ognl-cdi-tracking-data docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/ognl-cdi-tracking-data
# - bash mvnw >/dev/null
# - bash gradlew >/dev/null
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - docker-compose down -v
# - stop_any 8080 80
- stage: test
name: ognl-call-method maven
script:
- cd $TRAVIS_BUILD_DIR/ognl-call-method
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- stop_any 8080
# - stage: test
# name: ognl-call-method docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/ognl-call-method
# - bash mvnw -pl webapp clean package
# - bash gradlew clean build
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - docker-compose down -v
# - stop_any 8080 80
# - stage: test
# name: array-map-list-mapping maven
# script:
# - cd $TRAVIS_BUILD_DIR/array-map-list-mapping
# - bash mvnw -pl webapp clean package jetty:run &
# - wait_for 8080
# - http :8080/webapp/
# - stop_any 8080
- stage: test
name: array-map-list-mapping docker-compose
script:
- cd $TRAVIS_BUILD_DIR/array-map-list-mapping
- bash mvnw -pl webapp clean package
- bash gradlew clean build
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
- http :8080/webapp/
- docker-compose down -v
- stop_any 8080 80
- stage: test
name: session-aware maven
script:
- cd $TRAVIS_BUILD_DIR/session-aware
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- stop_any 8080
# - stage: test
# name: session-aware docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/session-aware
# - bash mvnw -pl webapp clean package
# - bash gradlew clean build
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - docker-compose down -v
# - stop_any 8080 80
# - stage: test
# name: ognl-tracking-data maven
# script:
# - cd $TRAVIS_BUILD_DIR/ognl-tracking-data
# - bash mvnw -pl webapp clean package jetty:run &
# - wait_for 8080
# - http :8080/webapp/
# - stop_any 8080
- stage: test
name: ognl-tracking-data docker-compose
script:
- cd $TRAVIS_BUILD_DIR/ognl-tracking-data
- bash mvnw -pl webapp clean package
- bash gradlew clean build
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
- http :8080/webapp/
- docker-compose down -v
- stop_any 8080 80
- stage: test
name: struts2-freemarker-out-of-the-box maven
script:
- cd $TRAVIS_BUILD_DIR/struts2-freemarker-out-of-the-box
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- stop_any 8080
# - stage: test
# name: struts2-freemarker-out-of-the-box docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/struts2-freemarker-out-of-the-box
# - bash mvnw clean package
# - bash gradlew clean build
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - docker-compose down -v
# - stop_any 8080 80
# - stage: test
# name: struts2-velocity maven
# script:
# - cd $TRAVIS_BUILD_DIR/struts2-velocity
# - bash mvnw -pl webapp clean package jetty:run &
# - wait_for 8080
# - http :8080/webapp/
# - stop_any 8080
- stage: test
name: struts2-velocity docker-compose
script:
- cd $TRAVIS_BUILD_DIR/struts2-velocity
- bash mvnw clean package
- bash gradlew clean build
- docker-compose build --force-rm --no-cache --pull
- docker-compose up --force-recreate --remove-orphans &
- wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
- http :8080/webapp/
- docker-compose down -v
- stop_any 8080 80
- stage: test
name: result-conventions-and-fallback maven
script:
- cd $TRAVIS_BUILD_DIR/result-conventions-and-fallback
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- http :8080/webapp/second-index
- http :8080/webapp/second-index/
- http :8080/webapp/blah/blah-blah
- stop_any 8080 80
# - stage: test
# name: result-conventions-and-fallback docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/result-conventions-and-fallback
# - bash mvnw clean package
# - bash gradlew clean build
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - http :8080/webapp/second-index
# - http :8080/webapp/second-index/
# - http :8080/webapp/blah/blah-blah
# - docker-compose down -v
# - stop_any 8080 80
- stage: test
name: handle-user-date maven jetty
script:
- cd $TRAVIS_BUILD_DIR/handle-user-date
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/find-all
- http :8080/webapp/submit-data.action\?newData=two
- http :8080/webapp/find-all
- stop_any 8080 80
# - stage: test
# name: handle-user-date docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/handle-user-date
# - bash mvnw clean package
# - bash gradlew clean build
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/find-all
# - http :8080/webapp/submit-data.action\?newData=three
# - http :8080/webapp/find-all
# - docker-compose down -v
# - stop_any 8080 80
# - stage: test
# name: using-conventions
# script:
# - cd $TRAVIS_BUILD_DIR/using-conventions
# - bash gradlew clean build
# - bash mvnw clean package
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - http :8080/webapp/hello
# - http :8080/webapp/customers/list
# - docker-compose down -v
# - stop_any 8080 80
- stage: test
name: render-property-from-action maven jetty plugin
script:
- cd $TRAVIS_BUILD_DIR/render-property-from-action
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- http :8080/webapp/hello-action
- stop_any 8080 80
# - stage: test
# name: render-property-from-action docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/render-property-from-action
# - bash gradlew >/dev/null
# - bash mvnw >/dev/null
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - http :8080/webapp/hello-action
# - docker-compose down -v
# - stop_any 8080 80
- stage: test
name: message-source-files
script:
- cd $TRAVIS_BUILD_DIR/message-source-files
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- http :8080/webapp/hello
- stop_any 8080
- stage: test
name: struts2-angularjs-starter
script:
- cd $TRAVIS_BUILD_DIR/struts2-angularjs-starter
- bash mvnw -f webapp/pom.xml clean package jetty:run &
- wait_for 8080
- http :8080/
- http :8080/home
- http :8080/projects
- stop_any 8080 80
- stage: test
name: starter gradle
script:
- cd $TRAVIS_BUILD_DIR/starter
- bash gradlew clean build
- stage: test
name: starter maven jetty plugin
script:
- cd $TRAVIS_BUILD_DIR/starter
- bash mvnw -pl webapp clean package jetty:run &
- wait_for 8080
- http :8080/webapp/
- http :8080/webapp/customers/list
- stop_any 8080 80
# - stage: test
# name: starter docker-compose
# script:
# - cd $TRAVIS_BUILD_DIR/starter
# - bash gradlew clean build >/dev/null
# - bash mvnw clean package >/dev/null
# - docker-compose build --force-rm --no-cache --pull
# - docker-compose up --force-recreate --remove-orphans &
# - wait_healthy_docker_containers 1 # https://github.com/daggerok/bash-functions/blob/master/main.bash#L131
# - http :8080/webapp/
# - http :8080/webapp/customers/list
# - docker-compose down -v
# - stop_any 8080 80
before_cache:
- for item in $(find ~/.gradle -name "*.lock") ;
do sudo rm -rfv $item ;
done
cache:
packages: true
directories:
- ~/.m2
- ~/.docker
- ~/.gradle
- ~/.local/daggerok