From d009a3e53c735f61854e84d24da6f7005d961f97 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 28 Oct 2024 23:27:26 +0000 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools repository --- eng/common/pipelines/templates/jobs/perf.yml | 37 +++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/eng/common/pipelines/templates/jobs/perf.yml b/eng/common/pipelines/templates/jobs/perf.yml index 20ad5de1c7891..3b4afc032f16a 100644 --- a/eng/common/pipelines/templates/jobs/perf.yml +++ b/eng/common/pipelines/templates/jobs/perf.yml @@ -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 }} + - 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