Set DOCKER_HOST before creating secrets
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc 2020-09-25 20:32:04 +02:00
parent feba68f11e
commit cd8ef52860

View File

@ -17,6 +17,11 @@ generate_secrets() {
BINARY=yq_linux_amd64 BINARY=yq_linux_amd64
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\ wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\
chmod +x /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 for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
eval "echo \"generating $SECRET\"" eval "echo \"generating $SECRET\""
PW=$(</dev/urandom tr -dc 'A-Za-z0-9' | head -c 40; echo) PW=$(</dev/urandom tr -dc 'A-Za-z0-9' | head -c 40; echo)