From b00358e4fbec42d2fdb6c901bea8603437886c4a Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 9 Jul 2018 21:06:13 -0700 Subject: [PATCH] Remove unwanted containers at CI job start. (cherry picked from commit 528de5b82f1e59a1a04c596e084921de81d92646) --- test/utils/shippable/shippable.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/utils/shippable/shippable.sh b/test/utils/shippable/shippable.sh index 54dc2fbbd18..3396ecc8bff 100755 --- a/test/utils/shippable/shippable.sh +++ b/test/utils/shippable/shippable.sh @@ -12,6 +12,12 @@ test="$1" docker images ansible/ansible docker ps +for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v '^drydock/' | sed 's/^.* //'); do + docker rm -f "${container}" +done + +docker ps + if [ -d /home/shippable/cache/ ]; then ls -la /home/shippable/cache/ fi