Drone: Retrieve the machine-user from a Vault secret (#35489)

This will remove the need to use a Drone repository secret
This commit is contained in:
Javier Palomo
2021-06-10 12:22:03 +02:00
committed by GitHub
parent a07c53b671
commit 074c07b347
3 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
pull_secret = 'dockerconfigjson'
github_token = 'github_token'
drone_token = 'drone_token'
def from_secret(secret):
return {
@@ -19,5 +20,6 @@ def vault_secret(name, path, key):
def secrets():
return [
vault_secret(pull_secret, 'secret/data/common/gcr', '.dockerconfigjson'),
vault_secret(github_token, 'infra/data/ci/github/grafanabot', 'pat')
vault_secret(github_token, 'infra/data/ci/github/grafanabot', 'pat'),
vault_secret(drone_token, 'infra/data/ci/drone', 'machine-user-token'),
]