Skip to content

Commit

Permalink
[TASK] Prune dangling volumes in update command and add some informat…
Browse files Browse the repository at this point in the history
…ion about.
  • Loading branch information
ochorocho committed Jul 13, 2022
1 parent 165aad3 commit 297e01e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Resources/Private/CodeTemplates/Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,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
Expand Down

0 comments on commit 297e01e

Please sign in to comment.