From 63c192d09504a55ad10e36ee4d6eb22716bc4b45 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 17 Mar 2020 16:48:41 -0700 Subject: [PATCH] Try UsePythonVersion to work around py2 removal (#33695) * Try UsePythonVersion to work around py2 removal; Additionally, use hosted pools for windows to deal with lack of python on path * PR feedback (typos) --- eng/pipelines/coreclr/templates/format-job.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/format-job.yml b/eng/pipelines/coreclr/templates/format-job.yml index 740585c..e71b66b 100644 --- a/eng/pipelines/coreclr/templates/format-job.yml +++ b/eng/pipelines/coreclr/templates/format-job.yml @@ -26,7 +26,11 @@ jobs: name: ${{ format('format_{0}{1}_{2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }} displayName: ${{ format('Formatting {0}{1} {2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }} helixType: 'format' - pool: ${{ parameters.pool }} + ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + pool: + vmImage: 'windows-2019' + ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + pool: ${{ parameters.pool }} variables: ${{ parameters.variables }} condition: ${{ parameters.condition }} steps: @@ -38,6 +42,12 @@ jobs: version: '3.x' includePreviewVersions: true installationPath: $(Agent.ToolsDirectory)/dotnet + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.x' + addToPath: true + architecture: 'x64' + condition: ${{ eq(parameters.osGroup, 'Windows_NT') }} - task: PythonScript@0 displayName: Run tests/scripts/format.py inputs: -- 2.7.4