Skip to content

Commit

Permalink
Use MSI based Resource Manager for Builds / Tests (#4674)
Browse files Browse the repository at this point in the history
* Update template-install-keyvault-secrets.yaml

* Update template-install-keyvault-secrets.yaml

* Update template-install-keyvault-secrets.yaml

* Update template-install-keyvault-secrets.yaml

* Update template-install-keyvault-secrets.yaml
  • Loading branch information
gladjohn authored Mar 22, 2024
1 parent add5f1c commit d237013
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build/template-install-keyvault-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
# Install all secrets needed from KeyVault onto the build machine.

steps:
- task: AzureKeyVault@1
displayName: 'Azure Key Vault: buildautomation'
# Task to download Azure Key Vault secrets using the Azure Key Vault task version 2.
- task: AzureKeyVault@2
displayName: 'Connect to Key Vault'
inputs:
azureSubscription: '.NET Keyvault'
KeyVaultName: buildautomation
SecretsFilter: 'AzureADIdentityDivisionTestAgentCert'

azureSubscription: 'AuthSdkResourceManager' # string. Workload identity service connection to use managed identity authentication
KeyVaultName: 'buildautomation' # string. Required. The name of the Key Vault containing the secrets.
#setting secrets filter to fetch only AzureADIdentityDivisionTestAgentCert cert from the vault
SecretsFilter: 'AzureADIdentityDivisionTestAgentCert' # string. Required. Specifies the secret to download. Use '*' for all secrets.
#RunAsPreJob: false # boolean. Make secrets available to whole job. Default: false.

- powershell: |
$kvSecretBytes = [System.Convert]::FromBase64String('$(AzureADIdentityDivisionTestAgentCert)')
Expand Down

0 comments on commit d237013

Please sign in to comment.