From 1fb6799b1088c6d013d116f512be824f86197535 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Fri, 25 Sep 2020 20:37:43 +0200 Subject: [PATCH] Delete secrets if using `generate_secrets` --- plugin.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.sh b/plugin.sh index 32e60b8..0f70105 100755 --- a/plugin.sh +++ b/plugin.sh @@ -18,11 +18,10 @@ generate_secrets() { wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\ chmod +x /usr/bin/yq - docker secret ls export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" - docker secret ls for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do + eval "docker secret rm \"$SECRET\" - || true"; eval "echo \"generating $SECRET\"" PW=$(