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

* 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:43:28 -07:00 коммит произвёл GitHub
Родитель 0c51b5c414
Коммит 89f8c984b9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 25 добавлений и 14 удалений

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

@ -122,23 +122,34 @@ jobs:
ResourceType: perf
ServiceConnection: azure-sdk-tests-public
- script: >-
dotnet run -- run
--language ${{ parameters.Language }}
--language-version ${{ parameters.LanguageVersion }}
--repo-root $(System.DefaultWorkingDirectory)
--tests-file $(System.DefaultWorkingDirectory)/sdk/${{ parameters.ServiceDirectory }}/perf-tests.yml
--package-versions "${{ parameters.PackageVersions }}"
--tests "${{ parameters.Tests }}"
--arguments "${{ parameters.Arguments }}"
--iterations ${{ parameters.Iterations }}
$(Profile)
${{ parameters.AdditionalArguments }}
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
- 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
--language ${{ parameters.Language }}
--language-version ${{ parameters.LanguageVersion }}
--repo-root $(System.DefaultWorkingDirectory)
--tests-file $(System.DefaultWorkingDirectory)/sdk/${{ parameters.ServiceDirectory }}/perf-tests.yml
--package-versions "${{ parameters.PackageVersions }}"
--tests "${{ parameters.Tests }}"
--arguments "${{ parameters.Arguments }}"
--iterations ${{ parameters.Iterations }}
$(Profile)
${{ parameters.AdditionalArguments }}
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
displayName: Run perf tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
${{ each var in parameters.EnvVars }}:
${{ var.key }}: ${{ var.value }}
displayName: Run perf tests
- pwsh: |
get-content results.txt