Tidy up secret generation
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
49bf48039b
commit
904c475947
|
@ -22,9 +22,9 @@ generate_secrets() {
|
|||
|
||||
for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
|
||||
SECRET=$(eval echo "$SECRET")
|
||||
docker secret ls
|
||||
echo "$SECRET"
|
||||
if ! docker secret ls | grep -q "$SECRET"; then
|
||||
if docker secret ls | grep -q "$SECRET"; then
|
||||
echo "Skipping existing secret $SECRET"
|
||||
else
|
||||
eval "echo \"generating $SECRET\""
|
||||
PW=$(</dev/urandom tr -dc 'A-Za-z0-9' | head -c 40; echo)
|
||||
eval "echo \"$PW\" | docker secret create \"$SECRET\" -";
|
||||
|
|
Reference in New Issue