From 2be8874db1344b9f086952feb463061e5542cbf4 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 25 Sep 2020 20:40:51 +0200 Subject: [PATCH] Move secret cleanup to cleanup area --- plugin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index aada374..f2f7fe7 100755 --- a/plugin.sh +++ b/plugin.sh @@ -63,7 +63,6 @@ run_stack_wait() { run_purge() { echo "--- start purge ---" docker -H "$DOCKER_HOST" stack rm "$PLUGIN_STACK" - docker -H "$DOCKER_HOST" secret ls -q | docker -H "$DOCKER_HOST" secret rm echo "--- end purge ---" } @@ -72,6 +71,7 @@ run_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 + docker -H "$DOCKER_HOST" secret ls -q | docker -H "$DOCKER_HOST" secret rm echo "--- end cleanup ---" }