From cd8ef5286042976adb4df540afaa1d3db1f3a059 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Fri, 25 Sep 2020 20:32:04 +0200 Subject: [PATCH] Set DOCKER_HOST before creating secrets --- plugin.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index 9f83e53..1c974b2 100755 --- a/plugin.sh +++ b/plugin.sh @@ -17,7 +17,12 @@ generate_secrets() { BINARY=yq_linux_amd64 wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\ chmod +x /usr/bin/yq - for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do + + 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 "echo \"generating $SECRET\"" PW=$(