From 992d1dbae2068f238a389503f3974f9ccaa7b298 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 21 Jan 2023 11:02:47 -0800 Subject: [PATCH] Fix multiple compose file secret generation? --- plugin.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/plugin.sh b/plugin.sh index 69adc0c..cbd1272 100755 --- a/plugin.sh +++ b/plugin.sh @@ -32,16 +32,18 @@ generate_secrets() { chmod +x /usr/bin/yq # shellcheck disable=SC2086 - for SECRET in $(yq r ${PLUGIN_COMPOSE//:/ } 'secrets.*.name'); do - echo "$SECRET" - SECRET=$(eval echo "$SECRET") - if docker -H "$REMOTE_DOCKER_HOST" secret ls | grep -q "$SECRET"; then - echo "Skipping existing secret $SECRET" - else - eval "echo \"generating $SECRET\"" - PW=$(