docker-compose.yml 39.8 KB
Newer Older
1
2
3
version: '2.3'
services:
  chrome:
4
    image: ${DOCKER_SELENIUM_IMAGE}
5
6
    tmpfs:
      - /dev/shm:rw,nosuid,nodev,noexec,relatime
7

8
9
  mysql:
    image: mysql:${MYSQL_VERSION}
10
11
12
13
14
    environment:
      MYSQL_ROOT_PASSWORD: funcp
    tmpfs:
      - /var/lib/mysql/:rw,noexec,nosuid

15
16
  mariadb:
    image: mariadb:${MARIADB_VERSION}
17
18
19
20
21
    environment:
      MYSQL_ROOT_PASSWORD: funcp
    tmpfs:
      - /var/lib/mysql/:rw,noexec,nosuid

22
  postgres:
23
    image: postgres:${POSTGRES_VERSION}-alpine
24
25
    environment:
      POSTGRES_PASSWORD: funcp
26
      POSTGRES_USER: funcu
27
28
29
30
    tmpfs:
      - /var/lib/postgresql/data:rw,noexec,nosuid

  web:
31
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
32
    user: "${HOST_UID}"
33
34
35
    stop_grace_period: 1s
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
36
37
    extra_hosts:
      - "host.docker.internal:host-gateway"
38
39
40
41
42
43
44
45
    command: >
      /bin/sh -c "
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          php -S web:8000 -t ${CORE_ROOT}
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
46
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
47
48
49
          php -S web:8000 -t ${CORE_ROOT}
        fi
      "
50
51
52
53
54
55
56

  redis4:
    image: redis:4-alpine

  memcached1-5:
    image: memcached:1.5-alpine

57
  acceptance_split:
58
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
59
    user: "${HOST_UID}"
60
61
62
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
Christian Kuhn's avatar
Christian Kuhn committed
63
    command: php -dxdebug.mode=off Build/Scripts/splitAcceptanceTests.php -v ${CHUNKS}
64

65
  prepare_acceptance_application_mariadb:
66
67
    image: alpine:3.8
    links:
68
      - mariadb
69
70
71
72
73
74
75
76
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
77
        while ! nc -z mariadb 3306; do
78
79
80
81
          sleep 1;
        done;
        echo Database is up;
      "
82
  acceptance_application_mariadb:
83
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
84
    user: "${HOST_UID}"
85
86
87
88
    environment:
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
89
      typo3DatabaseHost: mariadb
90
91
92
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
93
94
    extra_hosts:
      - "host.docker.internal:host-gateway"
95
96
97
98
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
99
100
101
102
        fi
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
103
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
104
        else
105
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
106
107
        fi
        mkdir -p typo3temp/var/tests/
108
109
110
111
112
113
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
114
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
115
116
          $${COMMAND};
        fi
117
118
      "

119
  prepare_acceptance_application_mysql:
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    image: alpine:3.8
    links:
      - mysql
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
        while ! nc -z mysql 3306; do
          sleep 1;
        done;
        echo Database is up;
      "
136
  acceptance_application_mysql:
137
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
138
    user: "${HOST_UID}"
139
140
141
142
143
144
145
146
    environment:
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
      typo3DatabaseHost: mysql
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
147
148
    extra_hosts:
      - "host.docker.internal:host-gateway"
149
150
151
152
153
154
155
156
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
157
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
158
        else
159
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
160
161
        fi
        mkdir -p typo3temp/var/tests/
162
163
164
165
166
167
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
168
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
169
170
          $${COMMAND};
        fi
171
172
      "

173
  prepare_acceptance_application_postgres:
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    image: alpine:3.8
    links:
      - postgres
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
        while ! nc -z postgres 5432; do
          sleep 1;
        done;
        echo Database is up;
      "
190
  acceptance_application_postgres:
191
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
192
    user: "${HOST_UID}"
193
194
195
196
197
198
199
200
201
202
203
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_pgsql
      typo3DatabaseName: bamboo
      typo3DatabaseUsername: funcu
      typo3DatabaseHost: postgres
      typo3DatabasePassword: funcp
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
204
205
    extra_hosts:
      - "host.docker.internal:host-gateway"
206
207
208
209
210
211
212
213
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
214
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
215
        else
216
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
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
        fi
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
          $${COMMAND};
        fi
      "

  prepare_acceptance_application_sqlite:
    image: alpine:3.8
    links:
      - chrome
      - web
    command: >
      /bin/sh -c "
        sleep 1;
      "

  acceptance_application_sqlite:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      typo3DatabaseDriver: pdo_sqlite
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
252
253
254
255
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
256
        fi
257
258
259
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
260
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
261
        else
262
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
263
264
        fi
        mkdir -p typo3temp/var/tests/
265
266
267
268
269
270
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
271
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
272
273
          $${COMMAND};
        fi
274
275
      "

276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
  prepare_acceptance_install_mysql:
    image: alpine:3.8
    links:
      - mysql
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
        while ! nc -z mysql 3306; do
          sleep 1;
        done;
        echo Database is up;
      "
  acceptance_install_mysql:
294
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
295
    user: "${HOST_UID}"
296
297
298
299
300
301
302
303
    environment:
      typo3InstallMysqlDatabaseHost: mysql
      typo3InstallMysqlDatabaseName: func_test
      typo3InstallMysqlDatabaseUsername: root
      typo3InstallMysqlDatabasePassword: funcp
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
304
305
    extra_hosts:
      - "host.docker.internal:host-gateway"
306
307
308
309
310
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
311
312
313
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
314
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql --xml reports.xml --html reports.html
315
316
317
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
318
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
319
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql --xml reports.xml --html reports.html
320
        fi
321
      "
322

323
  prepare_acceptance_install_mariadb:
324
325
    image: alpine:3.8
    links:
326
      - mariadb
327
328
329
330
331
332
333
334
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
335
        while ! nc -z mariadb 3306; do
336
337
338
339
          sleep 1;
        done;
        echo Database is up;
      "
340
  acceptance_install_mariadb:
341
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
342
    user: "${HOST_UID}"
343
    environment:
344
      typo3InstallMysqlDatabaseHost: mariadb
345
346
347
348
349
350
      typo3InstallMysqlDatabaseName: func_test
      typo3InstallMysqlDatabaseUsername: root
      typo3InstallMysqlDatabasePassword: funcp
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
351
352
    extra_hosts:
      - "host.docker.internal:host-gateway"
353
354
355
356
357
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
358
359
360
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
361
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=mysql --xml reports.xml --html reports.html
362
363
364
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
365
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
366
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=mysql --xml reports.xml --html reports.html
367
        fi
368
369
      "

370
  prepare_acceptance_install_postgres:
371
372
    image: alpine:3.8
    links:
373
      - postgres
374
375
376
377
378
379
380
381
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
382
        while ! nc -z postgres 5432; do
383
384
385
386
          sleep 1;
        done;
        echo Database is up;
      "
387
  acceptance_install_postgres:
388
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
389
    user: "${HOST_UID}"
390
    environment:
391
      typo3InstallPostgresqlDatabaseHost: postgres
392
      typo3InstallPostgresqlDatabaseName: ${HOST_USER}
393
      typo3InstallPostgresqlDatabaseUsername: funcu
394
395
396
397
      typo3InstallPostgresqlDatabasePassword: funcp
    working_dir: ${CORE_ROOT}
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
398
399
    extra_hosts:
      - "host.docker.internal:host-gateway"
400
401
402
403
404
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
405
406
407
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
408
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=postgresql --xml reports.xml --html reports.html
409
410
411
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
412
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
413
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=postgresql --xml reports.xml --html reports.html
414
        fi
415
416
417
418
419
420
421
422
423
424
425
426
      "

  prepare_acceptance_install_sqlite:
    image: alpine:3.8
    links:
      - chrome
      - web
    command: >
      /bin/sh -c "
        sleep 1;
      "
  acceptance_install_sqlite:
427
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
428
    user: "${HOST_UID}"
429
430
431
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
432
433
    extra_hosts:
      - "host.docker.internal:host-gateway"
434
435
436
437
438
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
439
440
441
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
442
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=sqlite --xml reports.xml --html reports.html
443
444
445
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
446
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
447
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=sqlite --xml reports.xml --html reports.html
448
        fi
449
450
451
      "

  build_css:
452
    image: typo3/core-testing-js:latest
453
    user: "${HOST_UID}"
454
455
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
456
457
    environment:
      HOME: "${CORE_ROOT}/.cache"
458
459
460
461
462
463
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
464
465
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
466
        node_modules/grunt/bin/grunt css
467
468
469
      "

  build_javascript:
470
    image: typo3/core-testing-js:latest
471
    user: "${HOST_UID}"
472
473
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
474
475
    environment:
      HOME: "${CORE_ROOT}/.cache"
476
477
478
479
480
481
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
482
483
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
484
        node_modules/grunt/bin/grunt scripts
485
486
487
      "

  cgl_git:
488
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
489
    user: "${HOST_UID}"
490
491
492
493
494
495
496
497
498
499
500
501
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/cglFixMyCommit.sh ${CGLCHECK_DRY_RUN};
      "

  cgl_all:
502
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
503
    user: "${HOST_UID}"
504
505
506
507
508
509
510
511
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
512
        php -dxdebug.mode=off bin/php-cs-fixer fix -v ${CGLCHECK_DRY_RUN} --path-mode intersection \
513
          --config=Build/php-cs-fixer.php typo3/
514
515
516
      "

  check_annotations:
517
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
518
    user: "${HOST_UID}"
519
520
521
522
523
524
525
526
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
527
        php -dxdebug.mode=off Build/Scripts/annotationChecker.php;
528
529
      "

530
531
532
533
534
535
536
537
538
539
540
541
542
543
  check_test_methods_prefix:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -dxdebug.mode=off Build/Scripts/testMethodPrefixChecker.php;
      "

544
  check_bom:
545
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
546
    user: "${HOST_UID}"
547
548
549
550
551
552
553
554
555
556
557
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/checkUtf8Bom.sh
      "

558
  check_composer:
559
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
560
    user: "${HOST_UID}"
561
562
563
564
565
566
567
568
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
569
        php -dxdebug.mode=off Build/Scripts/checkIntegrityComposer.php;
570
571
572
      "

  check_exception_codes:
573
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
574
    user: "${HOST_UID}"
575
576
577
578
579
580
581
582
583
584
585
586
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/duplicateExceptionCodeCheck.sh;
      "

  check_extension_scanner_rst:
587
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
588
    user: "${HOST_UID}"
589
590
591
592
593
594
595
596
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
597
        php -dxdebug.mode=off Build/Scripts/extensionScannerRstFileReferences.php;
598
599
600
      "

  check_file_path_length:
601
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
602
    user: "${HOST_UID}"
603
604
605
606
607
608
609
610
611
612
613
614
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/maxFilePathLength.sh;
      "

  check_git_submodule:
615
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
616
    user: "${HOST_UID}"
617
618
619
620
621
622
623
624
625
626
627
628
629
630
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        if [ `git submodule status 2>&1 | wc -l` -ne 0 ]; then
          echo \"Found a submodule definition in repository\";
          exit 1;
        fi
      "

631
  check_grunt_clean:
632
    image: typo3/core-testing-js:latest
633
    user: "${HOST_UID}"
634
635
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
636
637
    environment:
      HOME: "${CORE_ROOT}/.cache"
638
639
640
641
642
643
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
644
645
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
646
647
648
649
650
651
652
        node_modules/grunt/bin/grunt build;
        cd ..;
        git add *;
        git status;
        git status | grep -q \"nothing to commit, working tree clean\"
      "

653
654
655
656
657
658
659
660
661
662
663
664
665
666
  check_namespace_integrity:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -dxdebug.mode=off Build/Scripts/checkNamespaceIntegrity.php;
      "

667
  check_permissions:
668
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
669
    user: "${HOST_UID}"
670
671
672
673
674
675
676
677
678
679
680
681
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/checkFilePermissions.sh;
      "

  check_rst:
682
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
683
    user: "${HOST_UID}"
684
685
686
687
688
689
690
691
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
692
        php -dxdebug.mode=off Build/Scripts/validateRstFiles.php;
693
694
695
      "

  composer_install:
696
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
697
    user: "${HOST_UID}"
698
699
700
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
701
702
    environment:
      COMPOSER_CACHE_DIR: ".cache/composer"
703
704
705
706
707
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
708
        composer install --no-progress --no-interaction;
709
710
      "

711
  composer_install_max:
712
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
713
    user: "${HOST_UID}"
714
715
716
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
717
718
    environment:
      COMPOSER_CACHE_DIR: ".cache/composer"
719
720
721
722
723
724
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        composer config --unset platform.php;
725
        composer update --no-progress --no-interaction;
726
727
728
729
        composer dumpautoload;
      "

  composer_install_min:
730
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
731
    user: "${HOST_UID}"
732
733
734
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
735
736
    environment:
      COMPOSER_CACHE_DIR: ".cache/composer"
737
738
739
740
741
742
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        composer config platform.php ${PHP_VERSION}.0;
743
        composer update --prefer-lowest --no-progress --no-interaction;
744
745
746
        composer dumpautoload;
      "

747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
  composer_test_distribution:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    environment:
      COMPOSER_CACHE_DIR: .cache/composer
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        cd Build/composer
        rm -rf composer.json composer.lock public/index.php public/typo3 public/typo3conf/ext var/ vendor/;
        cp composer.dist.json composer.json;
        composer update --no-progress --no-interaction;
      "

766
  composer_validate:
767
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
768
    user: "${HOST_UID}"
769
770
771
772
773
774
775
776
777
778
779
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        composer validate;
      "

780
  functional_split:
781
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
782
    user: "${HOST_UID}"
783
784
785
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
786
787
788
789
790
    command: >
      /bin/sh -c "
        rm -rf Build/phpunit/FunctionalTests-Job-*.xml
        php -dxdebug.mode=off Build/Scripts/splitFunctionalTests.php -v ${CHUNKS}
      "
791

792
  prepare_functional_mariadb:
793
794
    image: alpine:3.8
    links:
795
      - mariadb
796
797
798
799
800
801
802
803
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
804
        while ! nc -z mariadb 3306; do
805
806
807
808
          sleep 1;
        done;
        echo Database is up;
      "
809
  functional_mariadb:
810
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
811
    user: "${HOST_UID}"
812
813
814
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
815
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
816
817
818
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
819
      typo3DatabaseHost: mariadb
820
821
822
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
823
824
    extra_hosts:
      - "host.docker.internal:host-gateway"
825
826
827
828
829
830
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
831
832
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
833
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
834
        else
835
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
836
        fi
837
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
838
          XDEBUG_MODE=\"off\" $${COMMAND};
839
        else
Christian Kuhn's avatar
Christian Kuhn committed
840
841
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
842
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
Christian Kuhn's avatar
Christian Kuhn committed
843
          $${COMMAND};
844
845
        fi
      "
846
847
848
849
850
851
852
853
854
855
856
857
858
859
  functional_deprecated_mariadb:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
      typo3DatabaseHost: mariadb
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
860
861
    extra_hosts:
      - "host.docker.internal:host-gateway"
862
863
864
865
866
867
868
869
870
871
872
873
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
874
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
875
876
877
          $${COMMAND};
        fi
      "
878

879
  prepare_functional_mysql:
880
881
    image: alpine:3.8
    links:
882
      - mysql
883
884
885
886
887
888
889
890
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
891
        while ! nc -z mysql 3306; do
892
893
894
895
          sleep 1;
        done;
        echo Database is up;
      "
896
  functional_mysql:
897
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
898
    user: "${HOST_UID}"
899
900
901
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
902
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
903
904
905
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
906
      typo3DatabaseHost: mysql
907
908
909
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
910
911
    extra_hosts:
      - "host.docker.internal:host-gateway"
912
913
914
915
916
917
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
918
919
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
920
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
921
        else
922
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
923
        fi
924
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
925
          XDEBUG_MODE=\"off\" $${COMMAND};
926
        else
Christian Kuhn's avatar
Christian Kuhn committed
927
928
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
929
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
Christian Kuhn's avatar
Christian Kuhn committed
930
          $${COMMAND};
931
932
        fi
      "
933
934
935
936
937
938
939
940
941
942
943
944
945
946
  functional_deprecated_mysql:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
      typo3DatabaseHost: mysql
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
947
948
    extra_hosts:
      - "host.docker.internal:host-gateway"
949
950
951
952
953
954
955
956
957
958
959
960
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
961
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
962
963
964
          $${COMMAND};
        fi
      "
965

966
  prepare_functional_postgres:
967
968
    image: alpine:3.8
    links:
969
      - postgres
970
971
972
973
974
975
976
977
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
978
        while ! nc -z postgres 5432; do
979
980
981
982
          sleep 1;
        done;
        echo Database is up;
      "
983
  functional_postgres:
984
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
985
    user: "${HOST_UID}"
986
987
988
989
990
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_pgsql
      typo3DatabaseName: bamboo
991
      typo3DatabaseUsername: funcu
992
      typo3DatabaseHost: postgres
993
994
995
996
      typo3DatabasePassword: funcp
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
997
998
    extra_hosts:
      - "host.docker.internal:host-gateway"
999
1000
    command: >
      /bin/sh -c "