File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ function GetAzureCredentials {
26
26
return $null
27
27
}
28
28
29
-
30
29
function MaskValue {
31
30
Param (
32
31
[string ] $key ,
@@ -119,6 +118,16 @@ function GetKeyVaultCredentials {
119
118
$creds = $null
120
119
}
121
120
}
121
+ if ($creds ) {
122
+ try {
123
+ # check that we have access to get secrets from the keyvault by trying to get a dummy secret
124
+ GetKeyVaultSecret - secretName ' algodummysecret' - keyVaultCredentials $creds - encrypted | Out-Null
125
+ }
126
+ catch {
127
+ Write-Host " Unable to get secrets from Azure Key Vault. Error was $ ( $_.Exception.Message ) . Using Github secrets instead."
128
+ $creds = $null
129
+ }
130
+ }
122
131
return $creds
123
132
}
124
133
Original file line number Diff line number Diff line change 10
10
- Fix issue with github ref when running reusable workflows
11
11
- Issue 1098 Support for specifying the name of the AZURE_CREDENTIALS secret by adding a AZURE_CREDENTIALSSecretName setting
12
12
- Fix placeholder syntax for git ref in PullRequestHandler.yaml
13
+ - Issue 1164 Getting secrets from Azure key vault fails in Preview
13
14
14
15
### Dependencies to PowerShell modules
15
16
You can’t perform that action at this time.
0 commit comments