Skip to content

Commit af9404f

Browse files
authored
fixing pipeline (#4792)
1 parent 2ffd637 commit af9404f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

eng/ci/templates/official/jobs/test-consolidated-cli-artifacts.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ jobs:
3131

3232
- template: /eng/ci/templates/steps/install-tools.yml@self
3333

34+
# For win-x86, we need to install x86 .NET 10 runtime. The install-tools.yml installs x64 versions.
35+
# The x86 func CLI spawns x86 worker processes that look for .NET in 'C:\Program Files (x86)\dotnet\'.
36+
# We install 'aspnetcore' runtime which includes both Microsoft.NETCore.App and Microsoft.AspNetCore.App.
37+
- ${{ if eq(parameters.arch, 'win-x86') }}:
38+
- task: PowerShell@2
39+
displayName: Install .NET 10 runtime (x86)
40+
inputs:
41+
targetType: 'inline'
42+
pwsh: true
43+
script: |
44+
$installScript = "$env:TEMP\dotnet-install.ps1"
45+
Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -OutFile $installScript
46+
& $installScript -Channel 10.0 -Runtime aspnetcore -Architecture x86 -InstallDir 'C:\Program Files (x86)\dotnet'
47+
Write-Host "Installed .NET runtimes in 'C:\Program Files (x86)\dotnet':"
48+
Get-ChildItem 'C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App'
49+
Get-ChildItem 'C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App'
50+
3451
- task: GoTool@0
3552
displayName: 'Install Go'
3653
inputs:
@@ -40,6 +57,13 @@ jobs:
4057
displayName: 'Download artifact'
4158
artifact: func-cli-${{ parameters.arch }}
4259

60+
# The minimal Linux image doesn't have unzip installed, so we need to install it.
61+
- ${{ if startsWith(parameters.arch, 'linux') }}:
62+
- bash: |
63+
sudo apt-get update
64+
sudo apt-get install -y unzip
65+
displayName: 'Install unzip'
66+
4367
- ${{ if startsWith(parameters.arch, 'min.') }}:
4468
- task: ExtractFiles@1
4569
displayName: 'Unzip func-cli (minified)'

0 commit comments

Comments
 (0)