hashicorp-vault-plugin
hashicorp-vault-plugin copied to clipboard
Feature Request: Azure Secrets
Add ability to generate dynamic credentials to use in build step
node {
def secrets = [
[path: 'azure/creds/myazurerole', engineVersion: azure, secretValues: [
[client_id: 'myID', client_secret: 'mySecret'],
]],
]
def configuration = [vaultUrl: 'http://my-very-other-vault-url.com',
vaultCredentialId: 'my-vault-cred-id',
engineVersion: azure]
// inside this block your credentials will be available as env variables
withVault([configuration: configuration, vaultSecrets: secrets]) {
sh 'az login --service-principal -u ${env.myID} -p ${env.mySecret} --tenant 202020200202
}
}