diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index 691c45dbe33dce4c58ec66b50b5a386a2e5618a5..3e834b2fbd928b2a4725a1ffb9532bb860f63a7e 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -208,10 +208,10 @@ Options: Activate dry-run in CGL check that does not actively change files and only prints broken ones. -u - 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 typo3/core-testing-*. + Update existing typo3/core-testing-*:latest docker images and remove dangling local docker volumes. + Maintenance call to docker pull latest versions of the main php images. The images are updated once + in a while and only the latest ones are supported by core testing. Use this if weird test errors occur. + Also removes obsolete image versions of typo3/core-testing-*. -v Enable verbose script output. Shows variables and docker commands. @@ -706,10 +706,18 @@ case ${TEST_SUITE} in docker-compose down ;; update) + # prune unused, dangling local volumes + echo "> prune unused, dangling local volumes" + docker volume ls -q -f driver=local -f dangling=true | awk '$0 ~ /^[0-9a-f]{64}$/ { print }' | xargs -I {} docker volume rm {} + echo "" # pull typo3/core-testing-*:latest versions of those ones that exist locally + echo "> 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 {} + echo "" # remove "dangling" typo3/core-testing-* images (those tagged as <none>) + echo "> 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 "" ;; *) echo "Invalid -s option argument ${TEST_SUITE}" >&2