Sync eng/common directory with azure-sdk-tools for PR 9259 (#8182)

* Run perf tests under federated auth

Run the tests under the same federated auth used to deploy the tests and setup the variables needed to configure AzurePipelineCredential.

* Fix indention for working directory

---------

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2024-10-29 13:45:15 -07:00 коммит произвёл GitHub
Родитель 5e08a1f6af
Коммит 28921b904a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 25 добавлений и 14 удалений

Просмотреть файл

@ -122,7 +122,17 @@ jobs:
ResourceType: perf ResourceType: perf
ServiceConnection: azure-sdk-tests-public ServiceConnection: azure-sdk-tests-public
- script: >- - task: AzurePowerShell@5
inputs:
azureSubscription: azure-sdk-tests-public
azurePowerShellVersion: LatestVersion
pwsh: true
ScriptType: InlineScript
Inline: >-
$account = (Get-AzContext).Account;
$env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id;
$env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants;
dotnet run -- run dotnet run -- run
--language ${{ parameters.Language }} --language ${{ parameters.Language }}
--language-version ${{ parameters.LanguageVersion }} --language-version ${{ parameters.LanguageVersion }}
@ -135,10 +145,11 @@ jobs:
$(Profile) $(Profile)
${{ parameters.AdditionalArguments }} ${{ parameters.AdditionalArguments }}
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
displayName: Run perf tests
env: env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
${{ each var in parameters.EnvVars }}: ${{ each var in parameters.EnvVars }}:
${{ var.key }}: ${{ var.value }} ${{ var.key }}: ${{ var.value }}
displayName: Run perf tests
- pwsh: | - pwsh: |
get-content results.txt get-content results.txt