Delete secrets if using `generate_secrets`
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d9b0724a19
commit
1fb6799b10
|
@ -18,11 +18,10 @@ generate_secrets() {
|
|||
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /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
|
||||
eval "docker secret rm \"$SECRET\" - || true";
|
||||
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