From d9b0724a19541bb795e87a23cf0089a3a2d7e5da Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 25 Sep 2020 20:35:27 +0200 Subject: [PATCH] Wait before cleaning and add TODO --- plugin.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.sh b/plugin.sh index 1c974b2..32e60b8 100755 --- a/plugin.sh +++ b/plugin.sh @@ -64,13 +64,14 @@ run_stack_wait() { run_purge() { echo "--- start purge ---" docker -H "$DOCKER_HOST" stack rm "$PLUGIN_STACK" - # See https://github.com/moby/moby/issues/30942#issuecomment-540699206 - until [ -z "$(docker stack ps "$PLUGIN_STACK" -q)" ]; do sleep 1; done + # TODO: also cleanup secrets once that is sorted echo "--- end purge ---" } run_cleanup() { echo "--- start cleanup ---" + # See https://github.com/moby/moby/issues/30942#issuecomment-540699206 + until [ -z "$(docker stack ps "$PLUGIN_STACK" -q)" ]; do sleep 1; done docker -H "$DOCKER_HOST" system prune --all --volumes --force echo "--- end cleanup ---" }