Tweak nuclear destroy-all-secrets command
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2020-09-25 23:45:50 +02:00
parent a1222dc7d8
commit e9cf7313bf
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ run_cleanup() {
# See https://github.com/moby/moby/issues/30942#issuecomment-540699206
until [ -z "$(docker stack ps "$PLUGIN_STACK" -q)" ]; do sleep 1; done
docker -H "$DOCKER_HOST" system prune --all --volumes --force
docker -H "$DOCKER_HOST" secret rm "$(docker -H "$DOCKER_HOST" secret ls -q)" || true
# try and remove all secrets; Docker will leave ones which are in use
docker -H "$DOCKER_HOST" secret ls --format '{{ .Name }}' | xargs -i sh -c "echo {}; docker secret -H \"$DOCKER_HOST\" rm {} || true"
echo "--- end cleanup ---"
}