diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index d485aaef..b9a30d82 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -5,7 +5,7 @@ set +u if [[ $BUILDKITE_LABEL =~ ":selenium:" ]] || [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then CONTAINERS=$(docker ps -a -q) if [[ ${CONTAINERS} != "" ]]; then - echo "--- :docker: Clean environment" + echo "--- :docker: Remove lingering containers" docker rm -f ${CONTAINERS} fi fi diff --git a/.buildkite/hooks/pre-exit b/.buildkite/hooks/pre-exit new file mode 100755 index 00000000..6a1767f9 --- /dev/null +++ b/.buildkite/hooks/pre-exit @@ -0,0 +1,6 @@ +#!/bin/bash + +set +u + +echo "--- :docker: Clean environment" +docker system prune -af --volumes \ No newline at end of file