From cb3c49da8e10482cc019f6145c74b084a2efedbe Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Fri, 12 Feb 2021 00:05:26 +0000 Subject: [PATCH 1/7] [internal/release/3.1] Update dependencies from dnceng/internal/dotnet-core-setup --- NuGet.config | 19 ++----------------- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/NuGet.config b/NuGet.config index d189797980d..9c6075b1196 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,9 @@ - - + @@ -18,22 +17,8 @@ - - - - - - - - - - - - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8c85cedbfe5..214edd2f527 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,17 +82,17 @@ Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime. All Runtime.$rid packages should have the same version. --> - - https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup - 0267ad09c6f2e2a37b23b7d230ffbf9e787dd388 + + https://github.com/dotnet/core-setup + 2155b1825cee9a88eec48a7cc42e80c4a4a8ec5a https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup 3acd9b0cd16596bad450c82be08780875a73c05c - - https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup - 0267ad09c6f2e2a37b23b7d230ffbf9e787dd388 + + https://github.com/dotnet/core-setup + 2155b1825cee9a88eec48a7cc42e80c4a4a8ec5a https://dev.azure.com/dnceng/internal/_git/dotnet-corefx diff --git a/eng/Versions.props b/eng/Versions.props index 5cb99ef757d..abf5664227c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,8 +56,8 @@ 3.1.6 3.1.0 - 3.1.12 - 3.1.12-servicing.21069.9 + 3.1.13 + 3.1.13-servicing.21110.2 2.1.0 1.1.1 From 945dd07ff3fabf64fe67e7dd2197bbeedbe6ca0f Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 16 Feb 2021 23:42:47 +0000 Subject: [PATCH 2/7] [internal/release/3.1] Update dependencies from dnceng/internal/dotnet-core-setup - Coherency Updates: - System.Text.Encodings.Web: from 4.7.1 to 4.7.2 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms: from 3.1.4 to 3.1.5 (parent: Microsoft.NETCore.App.Runtime.win-x64) --- NuGet.config | 6 ++++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 6 +++--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index 9c6075b1196..694a158c28a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,9 +4,10 @@ + - + @@ -18,12 +19,13 @@ - + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 44806db6291..d7ae3def9a6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -66,9 +66,9 @@ https://github.com/dotnet/corefx 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://dev.azure.com/dnceng/internal/_git/dotnet-corefx - 059a4a19e602494bfbed473dbbb18f2dbfbd0878 + 9299d909ff6c03c664a3f9a3ef995a9fa2eeec3e https://dev.azure.com/dnceng/internal/_git/dotnet-corefx @@ -83,20 +83,20 @@ All Runtime.$rid packages should have the same version. --> - https://github.com/dotnet/core-setup - 2155b1825cee9a88eec48a7cc42e80c4a4a8ec5a + https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup + 64df28ec4a52d6cc23efffbb918eab87ee42600f https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup 3acd9b0cd16596bad450c82be08780875a73c05c - - https://github.com/dotnet/core-setup - 2155b1825cee9a88eec48a7cc42e80c4a4a8ec5a + + https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup + 64df28ec4a52d6cc23efffbb918eab87ee42600f - + https://dev.azure.com/dnceng/internal/_git/dotnet-corefx - 50a99d5d3c6e68aecf70627897c0d862a92fc283 + 9299d909ff6c03c664a3f9a3ef995a9fa2eeec3e diff --git a/eng/Versions.props b/eng/Versions.props index e1f65b5ac46..a4e39f16329 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -57,7 +57,7 @@ 3.1.6 3.1.0 3.1.13 - 3.1.13-servicing.21110.2 + 3.1.13-servicing.21116.2 2.1.0 1.1.1 @@ -74,11 +74,11 @@ 4.7.0 4.7.0 4.7.0 - 4.7.1 + 4.7.2 4.7.2 4.7.1 - 3.1.4 + 3.1.5 1.0.0-beta.21110.10 From 0bc6ead6a91913f27844c460fc38d3c491c34efe Mon Sep 17 00:00:00 2001 From: William Godbe Date: Fri, 26 Feb 2021 17:21:15 -0800 Subject: [PATCH 3/7] Update branding to 2.1.27 (#3842) * Update branding to 2.1.27 * Fix patchconfig, baseline val --- eng/PatchConfig.props | 2 +- eng/targets/Packaging.targets | 2 +- version.props | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index 8480e9b039a..613cba5ec20 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -22,7 +22,7 @@ Microsoft.Extensions.Configuration.AzureKeyVault; - + diff --git a/eng/targets/Packaging.targets b/eng/targets/Packaging.targets index d7099ff86f8..ea33f871f2d 100644 --- a/eng/targets/Packaging.targets +++ b/eng/targets/Packaging.targets @@ -1,7 +1,7 @@ diff --git a/version.props b/version.props index 3603cc28111..91d8df61cd4 100644 --- a/version.props +++ b/version.props @@ -2,7 +2,9 @@ 2 1 - 26 + 27 + false + servicing $(BUILD_BUILDNUMBER) From ce1876bfa168df7eb7d491a8b82b3b3144d8a583 Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 9 Mar 2021 10:20:45 -0800 Subject: [PATCH 4/7] Update SDK and baseline --- eng/Baseline.Designer.props | 2 +- eng/Baseline.xml | 2 +- korebuild-lock.txt | 5 ++--- version.props | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index c10999bd41a..c302f8099d0 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,7 +2,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.25 + 2.1.26 diff --git a/eng/Baseline.xml b/eng/Baseline.xml index f15421b822f..2cc9d6eef27 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -1,4 +1,4 @@ - + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index b7c3b1faf72..4ebdda95e91 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,3 +1,2 @@ -version:2.1.7-build-20210209.2 -commithash:e2b019a5c8d338b060644e2ea5437beea1f5a888 - +version:2.1.7-build-20210309.1 +commithash:661bf72b3a220a08f26c1919c6f33113e894466d diff --git a/version.props b/version.props index 91d8df61cd4..f1578ee0b51 100644 --- a/version.props +++ b/version.props @@ -3,8 +3,8 @@ 2 1 27 - false - + true + servicing $(BUILD_BUILDNUMBER) From fcfe9395bf0e945794f20ef5d29120b3671b6e1a Mon Sep 17 00:00:00 2001 From: Will Godbe Date: Tue, 9 Mar 2021 10:51:02 -0800 Subject: [PATCH 5/7] Update baseline & SDK --- eng/Baseline.Designer.props | 484 ++++++++++++++++++------------------ eng/Baseline.xml | 108 ++++---- eng/Versions.props | 2 +- global.json | 4 +- 4 files changed, 299 insertions(+), 299 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 233ed25ee33..def62c9b0fc 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,230 +2,230 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - - - - + + + + - - - - + + + + - 3.1.12 + 3.1.13 - - + + - 3.1.12 + 3.1.13 - - + + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - - + + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - + + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - + - + - + - + - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - + - 3.1.12 + 3.1.13 @@ -238,358 +238,358 @@ - 3.1.12 + 3.1.13 - - - + + + - - - + + + - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - 3.1.12 + 3.1.13 - - - - + + + + - - - - + + + + - 3.1.12 + 3.1.13 - + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - - + + + - - - + + + - 3.1.12 + 3.1.13 - + - 3.1.12 + 3.1.13 - - - - + + + + - - - - + + + + - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - - - - + + + + - - - - + + + + - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - - - - - + + + + + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - - + + + - - - + + + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - + - + - 3.1.12 + 3.1.13 - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 - - - - + + + + - - - - + + + + - 3.1.12 + 3.1.13 - - + + - - + + - 3.1.12 + 3.1.13 @@ -598,20 +598,20 @@ - 3.1.12 + 3.1.13 - - + + - - - + + + - 3.1.12 + 3.1.13 @@ -619,7 +619,7 @@ - 3.1.12 + 3.1.13 diff --git a/eng/Baseline.xml b/eng/Baseline.xml index 627dd6ff5bf..bd2f4067580 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,58 +4,58 @@ This file contains a list of all the packages and their versions which were rele build of Extensions. Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Versions.props b/eng/Versions.props index 737115bd137..dbf97407ea7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 3 1 14 - false + true $(MajorVersion).$(MinorVersion).$(PatchVersion) servicing diff --git a/global.json b/global.json index 953730c4413..cfca96035a3 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "3.1.112" + "version": "3.1.113" }, "tools": { - "dotnet": "3.1.112", + "dotnet": "3.1.113", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppInternalPackageVersion)" From 6e8979432cb25ebe90854304474e60de22678bcc Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 10 Mar 2021 10:41:03 -0800 Subject: [PATCH 6/7] Update dependencies from https://github.com/dotnet/arcade build 20210308.9 (#3850) Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.GenAPI , Microsoft.DotNet.Helix.Sdk From Version 1.0.0-beta.21110.10 -> To Version 1.0.0-beta.21158.9 Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 3 -- eng/Version.Details.xml | 12 ++--- eng/Versions.props | 3 +- eng/common/build.ps1 | 48 +++++++++-------- eng/common/build.sh | 26 ++++++--- eng/common/tools.ps1 | 25 ++++----- eng/common/tools.sh | 113 +++++++++++++++++++++++++++------------- global.json | 4 +- 8 files changed, 144 insertions(+), 90 deletions(-) diff --git a/NuGet.config b/NuGet.config index 694a158c28a..eb512c26422 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,8 @@ - - @@ -19,7 +17,6 @@ - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d7ae3def9a6..f09c50ff7bc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -109,17 +109,17 @@ - + https://github.com/dotnet/arcade - 251249a04a9686ca2660e2acaa3094446a48f10d + ab42d248928f65dd174a2383f3256e68d9379bb7 - + https://github.com/dotnet/arcade - 251249a04a9686ca2660e2acaa3094446a48f10d + ab42d248928f65dd174a2383f3256e68d9379bb7 - + https://github.com/dotnet/arcade - 251249a04a9686ca2660e2acaa3094446a48f10d + ab42d248928f65dd174a2383f3256e68d9379bb7 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index dbf97407ea7..600c4ad0b29 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -10,7 +10,6 @@ 1 14 true - $(MajorVersion).$(MinorVersion).$(PatchVersion) servicing $(VersionPrefix).0 @@ -82,7 +81,7 @@ 3.1.5 - 1.0.0-beta.21110.10 + 1.0.0-beta.21158.9 3.4.1-beta4-20127-10 diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index e001ccb481c..a2d79b4468c 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -22,6 +22,8 @@ Param( [switch] $ci, [switch] $prepareMachine, [switch] $help, + [string] $runtimeSourceFeed = "", + [string] $runtimeSourceFeedKey = "", [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) @@ -29,33 +31,35 @@ Param( function Print-Usage() { Write-Host "Common settings:" - Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)" - Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild" - Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" - Write-Host " -binaryLog Output binary log (short: -bl)" - Write-Host " -help Print help and exit" + Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)" + Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild" + Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" + Write-Host " -binaryLog Output binary log (short: -bl)" + Write-Host " -help Print help and exit" Write-Host "" Write-Host "Actions:" - Write-Host " -restore Restore dependencies (short: -r)" - Write-Host " -build Build solution (short: -b)" - Write-Host " -rebuild Rebuild solution" - Write-Host " -deploy Deploy built VSIXes" - Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)" - Write-Host " -test Run all unit tests in the solution (short: -t)" - Write-Host " -integrationTest Run all integration tests in the solution" - Write-Host " -performanceTest Run all performance tests in the solution" - Write-Host " -pack Package build outputs into NuGet packages and Willow components" - Write-Host " -sign Sign build outputs" - Write-Host " -publish Publish artifacts (e.g. symbols)" + Write-Host " -restore Restore dependencies (short: -r)" + Write-Host " -build Build solution (short: -b)" + Write-Host " -rebuild Rebuild solution" + Write-Host " -deploy Deploy built VSIXes" + Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)" + Write-Host " -test Run all unit tests in the solution (short: -t)" + Write-Host " -integrationTest Run all integration tests in the solution" + Write-Host " -performanceTest Run all performance tests in the solution" + Write-Host " -pack Package build outputs into NuGet packages and Willow components" + Write-Host " -sign Sign build outputs" + Write-Host " -publish Publish artifacts (e.g. symbols)" Write-Host "" Write-Host "Advanced settings:" - Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)" - Write-Host " -ci Set when running on CI server" - Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build" - Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" - Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." + Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)" + Write-Host " -ci Set when running on CI server" + Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build" + Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" + Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." + Write-Host " -runtimeSourceFeed Alternate feed source for restoring .NET Runtimes and SDKs" + Write-Host " -runtimeSourceFeedKey Key value for non-public values of runtimeSourceFeed" Write-Host "" Write-Host "Command line arguments not listed above are passed thru to msbuild." @@ -75,7 +79,7 @@ function InitializeCustomToolset { } function Build { - $toolsetBuildProj = InitializeToolset + $toolsetBuildProj = InitializeToolset -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey InitializeCustomToolset $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } diff --git a/eng/common/build.sh b/eng/common/build.sh index 6236fc4d38c..230e41ac2e9 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -29,11 +29,14 @@ usage() echo "" echo "Advanced settings:" - echo " --projects Project or solution file(s) to build" - echo " --ci Set when running on CI server" - echo " --prepareMachine Prepare machine for CI run, clean up processes after build" - echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" - echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" + echo " --projects Project or solution file(s) to build" + echo " --ci Set when running on CI server" + echo " --prepareMachine Prepare machine for CI run, clean up processes after build" + echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" + echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" + echo " --runtimeSourceFeed Alternate (fallback) source for .NET Runtime and SDK installation" + echo " --runtimeSourceFeedKey Credentials (if needed) for authenticating to runtimeSourceFeed" + echo "" echo "Command line arguments not listed above are passed thru to msbuild." echo "Arguments can also be passed in with a single hyphen." @@ -73,6 +76,9 @@ configuration='Debug' prepare_machine=false verbosity='minimal' +runtimeSourceFeed='' +runtimeSourceFeedKey='' + properties='' while [[ $# > 0 ]]; do @@ -141,6 +147,14 @@ while [[ $# > 0 ]]; do node_reuse=$2 shift ;; + -runtimesourcefeed) + shift + runtimeSourceFeed="$1" + ;; + -runtimesourcefeedkey) + shift + runtimeSourceFeedKey="$1" + ;; *) properties="$properties $1" ;; @@ -166,7 +180,7 @@ function InitializeCustomToolset { } function Build { - InitializeToolset + InitializeToolset $runtimeSourceFeed $runtimeSourceFeedKey InitializeCustomToolset if [[ ! -z "$projects" ]]; then diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 84651fea050..2205c9e8117 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -96,7 +96,7 @@ function Exec-Process([string]$command, [string]$commandArgs) { } } -function InitializeDotNetCli([bool]$install) { +function InitializeDotNetCli([bool]$install, [string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey) { if (Test-Path variable:global:_DotNetInstallDir) { return $global:_DotNetInstallDir } @@ -138,7 +138,7 @@ function InitializeDotNetCli([bool]$install) { if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) { if ($install) { - InstallDotNetSdk $dotnetRoot $dotnetSdkVersion + InstallDotNetSdk -dotnetRoot $dotnetRoot -version $dotnetSdkVersion -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey } else { Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'" ExitWithExitCode 1 @@ -207,8 +207,8 @@ function GetDotNetInstallScript([string] $dotnetRoot) { return $installScript } -function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") { - InstallDotNet $dotnetRoot $version $architecture +function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey ) { + InstallDotNet -dotnetRoot $dotnetRoot -version $version -architecture $architecture -skipNonVersionedFiles $false -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey } function InstallDotNet([string] $dotnetRoot, @@ -233,10 +233,9 @@ function InstallDotNet([string] $dotnetRoot, & $installScript @installParameters } catch { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location." - - # Only the runtime can be installed from a custom [private] location. - if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) { + # If we fail, retry from a custom (possibly private) location. + if ($runtimeSourceFeed -or $runtimeSourceFeedKey) { + Write-Host "Failed to install dotnet runtime '$runtime' version '$version' from public location; trying specified alternate feed credentials" if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed } if ($runtimeSourceFeedKey) { @@ -253,6 +252,7 @@ function InstallDotNet([string] $dotnetRoot, ExitWithExitCode 1 } } else { + Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' version '$version' from public location." ExitWithExitCode 1 } } @@ -439,7 +439,7 @@ function LocateVisualStudio([object]$vsRequirements = $null){ return $vsInfo[0] } -function InitializeBuildTool() { +function InitializeBuildTool([string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey) { if (Test-Path variable:global:_BuildTool) { return $global:_BuildTool } @@ -451,7 +451,7 @@ function InitializeBuildTool() { # Initialize dotnet cli if listed in 'tools' $dotnetRoot = $null if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") { - $dotnetRoot = InitializeDotNetCli -install:$restore + $dotnetRoot = InitializeDotNetCli -install:$restore -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey } if ($msbuildEngine -eq "dotnet") { @@ -523,7 +523,8 @@ function InitializeNativeTools() { } } -function InitializeToolset() { +function InitializeToolset([string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey) +{ if (Test-Path variable:global:_ToolsetBuildProj) { return $global:_ToolsetBuildProj } @@ -545,7 +546,7 @@ function InitializeToolset() { ExitWithExitCode 1 } - $buildTool = InitializeBuildTool + $buildTool = InitializeBuildTool -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey $proj = Join-Path $ToolsetDir "restore.proj" $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index acbb0c5b3ff..c50849b01d0 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -28,6 +28,10 @@ prepare_machine=${prepare_machine:-false} # True to restore toolsets and dependencies. restore=${restore:-true} +# Allows restoring .NET Core Runtimes and SDKs from alternative feeds +runtimeSourceFeed=${runtimeSourceFeed:-""} +runtimeSourceFeedKey=${runtimeSourceFeedKey:-""} + # Adjusts msbuild verbosity level. verbosity=${verbosity:-'minimal'} @@ -95,6 +99,12 @@ function InitializeDotNetCli { fi local install=$1 + local runtimeSourceFeedArg="" + local runtimeSourceFeedKeyArg="" + if [[ $# == 3 ]]; then + runtimeSourceFeedArg=$2 + runtimeSourceFeedKeyArg=$3 + fi # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism export DOTNET_MULTILEVEL_LOOKUP=0 @@ -140,7 +150,7 @@ function InitializeDotNetCli { if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then if [[ "$install" == true ]]; then - InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version" + InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version" "unset" $runtimeSourceFeedArg $runtimeSourceFeedKeyArg else Write-PipelineTelemetryError -category 'InitializeToolset' "Unable to find dotnet with SDK version '$dotnet_sdk_version'" ExitWithExitCode 1 @@ -171,26 +181,26 @@ function InitializeDotNetCli { function InstallDotNetSdk { local root=$1 local version=$2 - local architecture="" + local architecture="unset" if [[ $# == 3 ]]; then architecture=$3 fi - InstallDotNet "$root" "$version" $architecture + InstallDotNet "$root" "$version" $architecture "not-a-runtime" 0 $runtimeSourceFeed $runtimeSourceFeedKey } function InstallDotNet { local root=$1 local version=$2 - + GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript local archArg='' - if [[ -n "${3:-}" ]]; then + if [[ -n "${3:-}" && "$3" != "unset" ]]; then archArg="--architecture $3" fi local runtimeArg='' - if [[ -n "${4:-}" ]]; then + if [[ -n "${4:-}" && "$4" != "not-a-runtime" ]]; then runtimeArg="--runtime $4" fi @@ -200,40 +210,61 @@ function InstallDotNet { fi bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || { local exit_code=$? - Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')." - if [[ -n "$runtimeArg" ]]; then - local runtimeSourceFeed='' - if [[ -n "${6:-}" ]]; then - runtimeSourceFeed="--azure-feed $6" - fi + local runtimeSourceFeed='' + if [[ -n "${6:-}" ]]; then + runtimeSourceFeed="--azure-feed $6" + fi - local runtimeSourceFeedKey='' - if [[ -n "${7:-}" ]]; then - # The 'base64' binary on alpine uses '-d' and doesn't support '--decode' - # '-d'. To work around this, do a simple detection and switch the parameter - # accordingly. - decodeArg="--decode" - if base64 --help 2>&1 | grep -q "BusyBox"; then - decodeArg="-d" - fi - decodedFeedKey=`echo $7 | base64 $decodeArg` - runtimeSourceFeedKey="--feed-credential $decodedFeedKey" + local runtimeSourceFeedKey='' + if [[ -n "${7:-}" ]]; then + # The 'base64' binary on alpine uses '-d' and doesn't support '--decode' + # '-d'. To work around this, do a simple detection and switch the parameter + # accordingly. + decodeArg="--decode" + if base64 --help 2>&1 | grep -q "BusyBox"; then + decodeArg="-d" fi + decodedFeedKey=`echo $7 | base64 $decodeArg` + runtimeSourceFeedKey="--feed-credential $decodedFeedKey" + else + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')." + fi - if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then - bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || { - local exit_code=$? - Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')." - ExitWithExitCode $exit_code - } - else + if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then + bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || { + local exit_code=$? + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')." ExitWithExitCode $exit_code - fi + } + else + ExitWithExitCode $exit_code fi } } +function with_retries { + local maxRetries=5 + local retries=1 + echo "Trying to run '$@' for maximum of $maxRetries attempts." + while [[ $((retries++)) -le $maxRetries ]]; do + "$@" + + if [[ $? == 0 ]]; then + echo "Ran '$@' successfully." + return 0 + fi + + timeout=$((3**$retries-1)) + echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2 + sleep $timeout + done + + echo "Failed to execute '$@' for $maxRetries times." 1>&2 + + return 1 +} + function GetDotNetInstallScript { local root=$1 local install_script="$root/dotnet-install.sh" @@ -246,13 +277,21 @@ function GetDotNetInstallScript { # Use curl if available, otherwise use wget if command -v curl > /dev/null; then + # first, try directly, if this fails we will retry with verbose logging curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || { - local exit_code=$? - Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." - ExitWithExitCode $exit_code + if command -v openssl &> /dev/null; then + echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation" + echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443 + fi + echo "Will now retry the same URL with verbose logging." + with_retries curl "$install_script_url" -sSL --verbose --retry 10 --create-dirs -o "$install_script" || { + local exit_code=$? + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." + ExitWithExitCode $exit_code + } } - else - wget -q -O "$install_script" "$install_script_url" || { + else + with_retries wget -v -O "$install_script" "$install_script_url" || { local exit_code=$? Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." ExitWithExitCode $exit_code @@ -268,7 +307,7 @@ function InitializeBuildTool { return fi - InitializeDotNetCli $restore + InitializeDotNetCli $restore $runtimeSourceFeed $runtimeSourceFeedKey # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" diff --git a/global.json b/global.json index cfca96035a3..e934f0bd95a 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.21110.10", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.21110.10" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.21158.9", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.21158.9" } } From 7d4963d0fe465cada4e74edf73ee2683512ad56b Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 11 Mar 2021 11:04:20 -0800 Subject: [PATCH 7/7] End line --- eng/Baseline.Designer.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 177d8e88949..def62c9b0fc 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -625,4 +625,4 @@ - + \ No newline at end of file