From 75d30bbd4b5878d995c26e4e536f3ab44e6613cf Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 12 Jul 2024 13:32:27 -0700 Subject: [PATCH] Enable use of pipeline credential. Fixes https://github.com/microsoft/azure-pipelines-tasks/issues/20046 (#23135) --- eng/pipelines/templates/steps/build-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index d53f11c18fb6..94603fb2fb32 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -82,6 +82,10 @@ steps: azurePowerShellVersion: LatestVersion ScriptType: InlineScript Inline: | + $account = (Get-AzContext).Account + $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id + $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants + ./eng/scripts/run_tests.ps1 ${{ parameters.ServiceDirectory }} ${{ parameters.TestRunTime }} $${{ parameters.EnableRaceDetector }} exit $LASTEXITCODE pwsh: true @@ -100,6 +104,10 @@ steps: azurePowerShellVersion: LatestVersion ScriptType: InlineScript Inline: | + $account = (Get-AzContext).Account + $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id + $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants + eng/scripts/Build_Perf.ps1 ${{ parameters.ServiceDirectory }} $$(UseAzcoreFromMain) exit $LASTEXITCODE pwsh: true