Skip to content

Commit 75d30bb

Browse files
authored
Enable use of pipeline credential. Fixes microsoft/azure-pipelines-tasks#20046 (#23135)
1 parent 3a7fc1c commit 75d30bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

eng/pipelines/templates/steps/build-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ steps:
8282
azurePowerShellVersion: LatestVersion
8383
ScriptType: InlineScript
8484
Inline: |
85+
$account = (Get-AzContext).Account
86+
$env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id
87+
$env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants
88+
8589
./eng/scripts/run_tests.ps1 ${{ parameters.ServiceDirectory }} ${{ parameters.TestRunTime }} $${{ parameters.EnableRaceDetector }}
8690
exit $LASTEXITCODE
8791
pwsh: true
@@ -100,6 +104,10 @@ steps:
100104
azurePowerShellVersion: LatestVersion
101105
ScriptType: InlineScript
102106
Inline: |
107+
$account = (Get-AzContext).Account
108+
$env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id
109+
$env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants
110+
103111
eng/scripts/Build_Perf.ps1 ${{ parameters.ServiceDirectory }} $$(UseAzcoreFromMain)
104112
exit $LASTEXITCODE
105113
pwsh: true

0 commit comments

Comments
 (0)