From cb70baaa549c720cdda98374f3ff308366121a14 Mon Sep 17 00:00:00 2001 From: Francisco-Gamino Date: Thu, 3 Feb 2022 11:04:24 -0800 Subject: [PATCH 1/2] Use .Net Core task to install .Net 6 --- azure-pipelines.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f3ee4db4..3d8479dd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,6 +38,11 @@ steps: env: BuildSourceBranch: $(Build.SourceBranch) +- task: UseDotNet@2 + displayName: 'Install .NET 6' + inputs: + version: 6.0.x + - pwsh: ./build.ps1 -NoBuild -Bootstrap displayName: 'Running ./build.ps1 -NoBuild -Bootstrap' @@ -58,17 +63,6 @@ steps: - pwsh: ./build.ps1 -NoBuild -Test displayName: 'Running UnitTest' -- pwsh: | - Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1' - ./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100" -Channel 'release' - displayName: 'Install the .Net version used by the Core Tools for Windows' - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - -- bash: | - curl -sSL https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh | bash /dev/stdin -v '6.0.100' -c 'release' --install-dir /usr/share/dotnet - displayName: 'Install the .Net version used by the Core Tools for Linux' - condition: eq( variables['Agent.OS'], 'Linux' ) - - pwsh: ./test/E2E/Start-E2ETest.ps1 env: AzureWebJobsStorage: $(AzureWebJobsStorage) From 152e00f1733659e8f38081e566a38ad8c6579ed3 Mon Sep 17 00:00:00 2001 From: Francisco-Gamino Date: Thu, 3 Feb 2022 16:44:15 -0800 Subject: [PATCH 2/2] Set .Net installation path for Windows and Linux --- azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3d8479dd..be6e7d38 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,10 +38,17 @@ steps: env: BuildSourceBranch: $(Build.SourceBranch) +- pwsh: | + $dotNetInstallationPath = if ($IsWindows) { "$env:ProgramFiles/dotnet" } else { "/usr/share/dotnet" } + Write-Host "##vso[task.setvariable variable=DotNetInstallationPath]$dotNetInstallationPath" + Write-Host "DotNetInstallationPath: $dotNetInstallationPath" + displayName: 'Set .Net 6 installation path' + - task: UseDotNet@2 displayName: 'Install .NET 6' inputs: version: 6.0.x + installationPath: variables["DotNetInstallationPath"] - pwsh: ./build.ps1 -NoBuild -Bootstrap displayName: 'Running ./build.ps1 -NoBuild -Bootstrap'