Skip to content

Instantly share code, notes, and snippets.

@tbeyer567
Created June 27, 2022 22:50
Show Gist options
  • Save tbeyer567/f685c3a7b1396e167d2cae6be19e01ca to your computer and use it in GitHub Desktop.
Save tbeyer567/f685c3a7b1396e167d2cae6be19e01ca to your computer and use it in GitHub Desktop.
image:
name: vault
variables:
VAULT_ADDR: https://sensible-crow.butters.rocks:8200/
read_secrets:
script:
- export VAULT_CACERT=/builds/tbeyer/right-flounder/ca.pem
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=demo-service-staging jwt=$CI_JOB_JWT)"
- export PASSWORD="$(vault kv get -field=db_password kv/staging/demo-service)"
- echo $CI_JOB_JWT
- echo "Password is ${PASSWORD}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment