Set SECRET using eval
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
661a65caae
commit
7d1031c7e0
|
@ -20,11 +20,10 @@ generate_secrets() {
|
||||||
|
|
||||||
export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT"
|
export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT"
|
||||||
|
|
||||||
|
for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
|
||||||
|
SECRET=$(eval echo "$SECRET")
|
||||||
docker secret ls
|
docker secret ls
|
||||||
echo "$SECRET"
|
echo "$SECRET"
|
||||||
|
|
||||||
|
|
||||||
for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
|
|
||||||
if ! docker secret ls | grep -q "$SECRET"; then
|
if ! docker secret ls | grep -q "$SECRET"; then
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue