From c86db93cb62c5cee26f05bb26c93aa63b41c6e8b Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Wed, 4 Nov 2020 17:07:27 -0800 Subject: [PATCH 1/4] Add .NET install workaround for RTM --- tools/releaseBuild/azureDevOps/templates/nuget.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/releaseBuild/azureDevOps/templates/nuget.yml b/tools/releaseBuild/azureDevOps/templates/nuget.yml index f2bcf49864a..5eab2ab40a2 100644 --- a/tools/releaseBuild/azureDevOps/templates/nuget.yml +++ b/tools/releaseBuild/azureDevOps/templates/nuget.yml @@ -34,6 +34,13 @@ jobs: displayName: 'Use .NET Core SDK from global.json' inputs: version: '$(SDKVersion)' + condition: ne('$(SDKVersion)', '5.0.100') + + - pwsh: | + Import-Module "$(Build.SourcesDirectory)/build.psm1" -Force + Install-Dotnet -Version '5.0.100-rtm.20526.5' + displayName: Install-DotNet + condition: eq('$(SDKVersion)', '5.0.100') - task: DownloadBuildArtifacts@0 displayName: 'Download PowerShell build artifacts' From b587778aa1f75579f0c6d1cb68840e97ee49f6a5 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 5 Nov 2020 13:46:10 -0800 Subject: [PATCH 2/4] Fix task condition --- tools/releaseBuild/azureDevOps/templates/nuget.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/releaseBuild/azureDevOps/templates/nuget.yml b/tools/releaseBuild/azureDevOps/templates/nuget.yml index 5eab2ab40a2..2703b914480 100644 --- a/tools/releaseBuild/azureDevOps/templates/nuget.yml +++ b/tools/releaseBuild/azureDevOps/templates/nuget.yml @@ -34,13 +34,13 @@ jobs: displayName: 'Use .NET Core SDK from global.json' inputs: version: '$(SDKVersion)' - condition: ne('$(SDKVersion)', '5.0.100') + condition: ne(variables['SDKVersion'], '5.0.100') - pwsh: | Import-Module "$(Build.SourcesDirectory)/build.psm1" -Force Install-Dotnet -Version '5.0.100-rtm.20526.5' displayName: Install-DotNet - condition: eq('$(SDKVersion)', '5.0.100') + condition: eq(variables['SDKVersion'], '5.0.100') - task: DownloadBuildArtifacts@0 displayName: 'Download PowerShell build artifacts' From b59e8de17ef297c2a28fa19e2d254a361eab73d9 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 5 Nov 2020 14:49:36 -0800 Subject: [PATCH 3/4] Add Find-Dotnet to set dotnet path --- tools/releaseBuild/azureDevOps/templates/nuget.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/releaseBuild/azureDevOps/templates/nuget.yml b/tools/releaseBuild/azureDevOps/templates/nuget.yml index 2703b914480..d18dfb0e978 100644 --- a/tools/releaseBuild/azureDevOps/templates/nuget.yml +++ b/tools/releaseBuild/azureDevOps/templates/nuget.yml @@ -99,6 +99,7 @@ jobs: - powershell: | Import-Module $env:BUILD_SOURCESDIRECTORY\build.psm1 Import-Module $env:BUILD_SOURCESDIRECTORY\tools\packaging + Find-Dotnet New-ILNugetPackage -PackagePath "$(PackagePath)" -PackageVersion "$(Version)" -WinFxdBinPath '$(winFxdPath)' -LinuxFxdBinPath '$(linuxFxdPath)' -GenAPIToolPath "$(GenAPIToolPath)" displayName: 'Create Nuget Package Folders' @@ -111,7 +112,7 @@ jobs: - powershell: | Import-Module $env:BUILD_SOURCESDIRECTORY\build.psm1 Import-Module $env:BUILD_SOURCESDIRECTORY\tools\packaging - + Find-Dotnet # Create unified package first New-GlobalToolNupkg -UnifiedPackage -LinuxBinPath "$(linuxFxdPath)" -WindowsBinPath "$(winFxdPath)" -WindowsDesktopBinPath "$(winFxdWinDesktopPath)" -PackageVersion "$(Version)" -DestinationPath "$(PackagePath)\globaltool" From e757afe62aa601bfece335c3342fc00391de11fa Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 5 Nov 2020 16:07:21 -0800 Subject: [PATCH 4/4] Add find-dotnet to release pipeline --- .../azureDevOps/templates/release-GlobalToolTest.yml | 3 ++- tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml b/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml index 59a8ba0862f..3c1a4513444 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml @@ -52,7 +52,8 @@ jobs: ## Install latest version from the channel - Install-Dotnet -Channel "$Channel" -Version $sdkVersion + #Install-Dotnet -Channel "$Channel" -Version $sdkVersion + Start-PSBootstrap Write-Verbose -Message "Installing .NET SDK completed." -Verbose diff --git a/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml b/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml index 84dccbd81f6..2a2f565bc90 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml @@ -40,7 +40,8 @@ jobs: ## Install latest version from the channel - Install-Dotnet -Channel "$Channel" -Version $sdkVersion + #Install-Dotnet -Channel "$Channel" -Version $sdkVersion + Start-PSBootstrap Write-Verbose -Message "Installing .NET SDK completed." -Verbose