From adb3a71db429b0de13b1bfc1394895c6ec358a6a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 24 Jul 2025 19:27:19 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 11336 (#6668) * Install .NET from tools repo global.json * Set workingDirectory to tools root * use exact same install steps as tools repo * revert formatting * formatting --------- Co-authored-by: Mike Harder --- eng/common/pipelines/templates/jobs/perf.yml | 25 ++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/jobs/perf.yml b/eng/common/pipelines/templates/jobs/perf.yml index 6209cc5ad..67c4accf3 100644 --- a/eng/common/pipelines/templates/jobs/perf.yml +++ b/eng/common/pipelines/templates/jobs/perf.yml @@ -112,8 +112,29 @@ jobs: - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml parameters: AgentImage: $(OSVmImage) - - - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # Copied from eng/pipelines/templates/steps/install-dotnet.yml, but changed workingDirectory + - task: UseDotNet@2 # About UseDotNet@2 task: https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/use-dotnet-v2?view=azure-pipelines + displayName: "Use .NET SDK from global.json" + retryCountOnTaskFailure: 3 + inputs: + useGlobalJson: true + workingDirectory: azure-sdk-tools + + # Copied from eng/pipelines/templates/steps/install-dotnet.yml, but changed workingDirectory + - task: UseDotNet@2 + displayName: "Use .NET SDK 8.0.x" + retryCountOnTaskFailure: 3 + inputs: + # We must install sdk, not just runtime, as it is required by some of our tools, like test-proxy. + # Specifically, test-proxy requires asp.net core runtime, which is installed only when sdk option + # is selected, per: https://github.com/microsoft/azure-pipelines-tasks/issues/14405 + packageType: sdk + version: 8.0.x + # performMultiLevelLookup comes into play when given .NET executable target runtime is different + # than the installed .NET SDK. Without this, such runtime would not be found. + performMultiLevelLookup: true + workingDirectory: azure-sdk-tools - ${{ parameters.InstallLanguageSteps }}