Commit 20314cb4 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] runTests.sh: Switch to a new set of test images

New images are to be found on official TYPO3
https://hub.docker.com/u/typo3 account.

Most images are based on alpine instead of ubuntu and
are thus significantly smaller than the old ones. For
example, the php 7.4 image is now ~170MB instead of ~500MB.

Image definitions are found and maintained at
https://gitlab.typo3.org/core-testing/testing-infrastructure/

* typo3/core-testing-phpXY: Images based on the official
  PHP alpine builds, extended with commands and modules
  we need.

* typo3/core-testing-js: Image based on official node
  image, with current yarn.

* typo3/core-testing-js-chrome: As above, but with chrome
  for javascript unit testing.

* typo3/core-testing-mssql2019: Image for microsoft sql
  server that includes a brutal hack to force sql server
  is fine if databases are located on a tmpfs (CI does that).

* postgres/XY-alpine: Drop-in replacement using the -alpine
  version that is ~1/3 in size.

Change-Id: I3dc57056052d3364ee925ba3a3216d95afe55f57
Resolves: #93403
Releases: master, 10.4, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67619


Tested-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent c730176b
......@@ -26,7 +26,6 @@ setUpDockerComposeDotEnv() {
echo "PHP_XDEBUG_ON=${PHP_XDEBUG_ON}" >> .env
echo "PHP_XDEBUG_PORT=${PHP_XDEBUG_PORT}" >> .env
echo "DOCKER_PHP_IMAGE=${DOCKER_PHP_IMAGE}" >> .env
echo "DOCKER_JS_IMAGE=${DOCKER_JS_IMAGE}" >> .env
echo "EXTRA_TEST_OPTIONS=${EXTRA_TEST_OPTIONS}" >> .env
echo "SCRIPT_VERBOSE=${SCRIPT_VERBOSE}" >> .env
echo "PHPUNIT_RANDOM=${PHPUNIT_RANDOM}" >> .env
......@@ -180,10 +179,10 @@ Options:
Activate dry-run in CGL check that does not actively change files and only prints broken ones.
-u
Update existing typo3gmbh/phpXY:latest docker images. Maintenance call to docker pull latest
Update existing typo3/core-testing-*:latest docker images. Maintenance call to docker pull latest
versions of the main php images. The images are updated once in a while and only the youngest
ones are supported by core testing. Use this if weird test errors occur. Also removes obsolete
image versions of typo3gmbh/phpXY.
image versions of typo3/core-testing-*.
-v
Enable verbose script output. Shows variables and docker commands.
......@@ -253,7 +252,6 @@ EXTRA_TEST_OPTIONS=""
SCRIPT_VERBOSE=0
PHPUNIT_RANDOM=""
CGLCHECK_DRY_RUN=""
DOCKER_JS_IMAGE="js"
MARIADB_VERSION="10.3"
MYSQL_VERSION="5.5"
POSTGRES_VERSION="10"
......@@ -656,14 +654,10 @@ case ${TEST_SUITE} in
docker-compose down
;;
update)
# pull typo3gmbh/phpXY:latest versions of those ones that exist locally
docker images typo3gmbh/php*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {}
# remove "dangling" typo3gmbh/phpXY images (those tagged as <none>)
docker images typo3gmbh/php* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {}
# pull typo3gmbh/js:latest versions of those ones that exist locally
docker images typo3gmbh/js:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {}
# remove "dangling" typo3gmbh/js images (those tagged as <none>)
docker images typo3gmbh/js --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {}
# pull typo3/core-testing-*:latest versions of those ones that exist locally
docker images typo3/core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {}
# remove "dangling" typo3/core-testing-* images (those tagged as <none>)
docker images typo3/core-testing-* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {}
;;
*)
echo "Invalid -s option argument ${TEST_SUITE}" >&2
......
......@@ -18,14 +18,14 @@ services:
- /var/lib/mysql/:rw,noexec,nosuid
mssql2019latest:
image: mcr.microsoft.com/mssql/server:2019-latest
image: typo3/core-testing-mssql2019:latest
environment:
ACCEPT_EULA: Y
SA_PASSWORD: "Test1234!"
MSSQL_PID: Developer
postgres:
image: postgres:${POSTGRES_VERSION}
image: postgres:${POSTGRES_VERSION}-alpine
environment:
POSTGRES_PASSWORD: funcp
POSTGRES_USER: funcu
......@@ -33,7 +33,7 @@ services:
- /var/lib/postgresql/data:rw,noexec,nosuid
web:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
stop_grace_period: 1s
volumes:
......@@ -47,7 +47,7 @@ services:
image: memcached:1.5-alpine
acceptance_split:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -72,7 +72,7 @@ services:
echo Database is up;
"
acceptance_backend_mariadb:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3DatabaseName: func_test
......@@ -119,7 +119,7 @@ services:
echo Database is up;
"
acceptance_pagetree_mariadb:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3DatabaseName: func_test
......@@ -159,7 +159,7 @@ services:
echo Database is up;
"
acceptance_installtool_mariadb:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3DatabaseName: func_test
......@@ -199,7 +199,7 @@ services:
echo Database is up;
"
acceptance_install_mysql:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3InstallMysqlDatabaseHost: mysql
......@@ -239,7 +239,7 @@ services:
echo Database is up;
"
acceptance_install_mariadb:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3InstallMysqlDatabaseHost: mariadb
......@@ -279,7 +279,7 @@ services:
echo Database is up;
"
acceptance_install_postgres:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3InstallPostgresqlDatabaseHost: postgres
......@@ -311,7 +311,7 @@ services:
sleep 1;
"
acceptance_install_sqlite:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -329,7 +329,7 @@ services:
"
build_css:
image: typo3gmbh/${DOCKER_JS_IMAGE}:latest
image: typo3/core-testing-js:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -347,7 +347,7 @@ services:
"
build_javascript:
image: typo3gmbh/${DOCKER_JS_IMAGE}:latest
image: typo3/core-testing-js:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -365,7 +365,7 @@ services:
"
cgl_git:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -382,7 +382,7 @@ services:
"
cgl_all:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -400,7 +400,7 @@ services:
"
check_annotations:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -417,7 +417,7 @@ services:
"
check_bom:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -434,7 +434,7 @@ services:
"
check_composer:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -451,7 +451,7 @@ services:
"
check_csv_fixtures:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -468,7 +468,7 @@ services:
"
fix_csv_fixtures:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -485,7 +485,7 @@ services:
"
check_exception_codes:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -502,7 +502,7 @@ services:
"
check_extension_scanner_rst:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -519,7 +519,7 @@ services:
"
check_file_path_length:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -536,7 +536,7 @@ services:
"
check_git_submodule:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -556,7 +556,7 @@ services:
"
check_grunt_clean:
image: typo3gmbh/${DOCKER_JS_IMAGE}:3.0
image: typo3/core-testing-js:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -578,7 +578,7 @@ services:
"
check_permissions:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -595,7 +595,7 @@ services:
"
check_rst:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -612,7 +612,7 @@ services:
"
check_xlf:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -629,7 +629,7 @@ services:
"
composer_install:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -646,7 +646,7 @@ services:
"
composer_install_max:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -665,7 +665,7 @@ services:
"
composer_install_min:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -684,7 +684,7 @@ services:
"
composer_validate:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -701,7 +701,7 @@ services:
"
doc_block_check:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -715,7 +715,7 @@ services:
"
functional_split:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -740,7 +740,7 @@ services:
echo Database is up;
"
functional_mariadb:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -794,7 +794,7 @@ services:
echo Database is up;
"
functional_mysql:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -849,7 +849,7 @@ services:
"
functional_mssql2019latest:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -905,7 +905,7 @@ services:
echo Database is up;
"
functional_postgres:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -951,7 +951,7 @@ services:
sleep 1;
"
functional_sqlite:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -984,7 +984,7 @@ services:
"
lint_php:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1001,7 +1001,7 @@ services:
"
lint_scss:
image: typo3gmbh/${DOCKER_JS_IMAGE}:latest
image: typo3/core-testing-js:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1019,7 +1019,7 @@ services:
"
lint_html:
image: typo3gmbh/${DOCKER_JS_IMAGE}:latest
image: typo3/core-testing-js:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1037,7 +1037,7 @@ services:
"
lint_typescript:
image: typo3gmbh/${DOCKER_JS_IMAGE}:latest
image: typo3/core-testing-js:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1055,7 +1055,7 @@ services:
"
phpstan:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1070,7 +1070,7 @@ services:
"
unit:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1095,7 +1095,7 @@ services:
"
unitDeprecated:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1120,7 +1120,7 @@ services:
"
unitJavascript:
image: typo3gmbh/${DOCKER_JS_IMAGE}:latest
image: typo3/core-testing-js-chrome:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......@@ -1139,7 +1139,7 @@ services:
"
unitRandom:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment