Merge in 'release/6.0.1xx' changes
This commit is contained in:
commit
fd122a4e52
8 changed files with 81 additions and 93 deletions
|
@ -197,19 +197,19 @@
|
|||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21560.2">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21609.4">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
|
||||
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
|
||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="6.0.0-beta.21560.2">
|
||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="6.0.0-beta.21609.4">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
|
||||
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
|
||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21560.2">
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21609.4">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
|
||||
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-alpha.1.21613.1">
|
||||
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade -->
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.21560.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.21609.4</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/winforms -->
|
||||
|
|
|
@ -188,9 +188,6 @@ function InitializeCustomToolset {
|
|||
|
||||
function Build {
|
||||
|
||||
if [[ "$ci" == true ]]; then
|
||||
TryLogClientIpAddress
|
||||
fi
|
||||
InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
|
|
|
@ -83,9 +83,6 @@ try {
|
|||
}
|
||||
|
||||
if ($restore) {
|
||||
if ($ci) {
|
||||
Try-LogClientIpAddress
|
||||
}
|
||||
Build 'Restore'
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ parameters:
|
|||
SourcesDirectory: $(Build.SourcesDirectory)
|
||||
CreatePr: true
|
||||
AutoCompletePr: false
|
||||
ReusePr: true
|
||||
UseLfLineEndings: true
|
||||
UseCheckedInLocProjectJson: false
|
||||
LanguageSet: VS_Main_Languages
|
||||
|
@ -64,6 +65,8 @@ jobs:
|
|||
${{ if eq(parameters.CreatePr, true) }}:
|
||||
isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
|
||||
isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
|
||||
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
||||
isShouldReusePrSelected: ${{ parameters.ReusePr }}
|
||||
packageSourceAuth: patAuth
|
||||
patVariable: ${{ parameters.CeapexPat }}
|
||||
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
||||
|
|
|
@ -163,9 +163,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
|
|||
# Disable telemetry on CI.
|
||||
if ($ci) {
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
# In case of network error, try to log the current IP for reference
|
||||
Try-LogClientIpAddress
|
||||
}
|
||||
|
||||
# Source Build uses DotNetCoreSdkDir variable
|
||||
|
@ -301,31 +298,44 @@ function InstallDotNet([string] $dotnetRoot,
|
|||
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
|
||||
if ($noPath) { $installParameters.NoPath = $True }
|
||||
|
||||
try {
|
||||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
if ($runtimeSourceFeed -or $runtimeSourceFeedKey) {
|
||||
Write-Host "Failed to install dotnet from public location. Trying from '$runtimeSourceFeed'"
|
||||
if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
|
||||
$variations = @()
|
||||
$variations += @($installParameters)
|
||||
|
||||
if ($runtimeSourceFeedKey) {
|
||||
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
|
||||
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
|
||||
$installParameters.FeedCredential = $decodedString
|
||||
}
|
||||
$dotnetBuilds = $installParameters.Clone()
|
||||
$dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public"
|
||||
$variations += @($dotnetBuilds)
|
||||
|
||||
try {
|
||||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from custom location '$runtimeSourceFeed'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from public location."
|
||||
ExitWithExitCode 1
|
||||
if ($runtimeSourceFeed) {
|
||||
$runtimeSource = $installParameters.Clone()
|
||||
$runtimeSource.AzureFeed = $runtimeSourceFeed
|
||||
if ($runtimeSourceFeedKey) {
|
||||
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
|
||||
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
|
||||
$runtimeSource.FeedCredential = $decodedString
|
||||
}
|
||||
$variations += @($runtimeSource)
|
||||
}
|
||||
|
||||
$installSuccess = $false
|
||||
foreach ($variation in $variations) {
|
||||
if ($variation | Get-Member AzureFeed) {
|
||||
$location = $variation.AzureFeed
|
||||
} else {
|
||||
$location = "public location";
|
||||
}
|
||||
Write-Host "Attempting to install dotnet from $location."
|
||||
try {
|
||||
& $installScript @variation
|
||||
$installSuccess = $true
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to install dotnet from $location."
|
||||
}
|
||||
}
|
||||
if (-not $installSuccess) {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -882,24 +892,6 @@ if (!$disableConfigureToolsetImport) {
|
|||
}
|
||||
}
|
||||
|
||||
function Try-LogClientIpAddress()
|
||||
{
|
||||
Write-Host "Attempting to log this client's IP for Azure Package feed telemetry purposes"
|
||||
try
|
||||
{
|
||||
$result = Invoke-WebRequest -Uri "http://co1.msedge.net/fdv2/diagnostics.aspx" -UseBasicParsing
|
||||
$lines = $result.Content.Split([Environment]::NewLine)
|
||||
$socketIp = $lines | Select-String -Pattern "^Socket IP:.*"
|
||||
Write-Host $socketIp
|
||||
$clientIp = $lines | Select-String -Pattern "^Client IP:.*"
|
||||
Write-Host $clientIp
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "Unable to get this machine's effective IP address for logging: $_"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic.
|
||||
#
|
||||
|
|
|
@ -188,28 +188,29 @@ function InstallDotNet {
|
|||
GetDotNetInstallScript "$root"
|
||||
local install_script=$_GetDotNetInstallScript
|
||||
|
||||
local archArg=''
|
||||
local installParameters=(--version $version --install-dir "$root")
|
||||
|
||||
if [[ -n "${3:-}" ]] && [ "$3" != 'unset' ]; then
|
||||
archArg="--architecture $3"
|
||||
installParameters+=(--architecture $3)
|
||||
fi
|
||||
local runtimeArg=''
|
||||
if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then
|
||||
runtimeArg="--runtime $4"
|
||||
installParameters+=(--runtime $4)
|
||||
fi
|
||||
local skipNonVersionedFilesArg=""
|
||||
if [[ "$#" -ge "5" ]] && [[ "$5" != 'false' ]]; then
|
||||
skipNonVersionedFilesArg="--skip-non-versioned-files"
|
||||
installParameters+=(--skip-non-versioned-files)
|
||||
fi
|
||||
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
|
||||
local exit_code=$?
|
||||
echo "Failed to install dotnet SDK from public location (exit code '$exit_code')."
|
||||
|
||||
local runtimeSourceFeed=''
|
||||
if [[ -n "${6:-}" ]]; then
|
||||
runtimeSourceFeed="--azure-feed $6"
|
||||
fi
|
||||
local variations=() # list of variable names with parameter arrays in them
|
||||
|
||||
local runtimeSourceFeedKey=''
|
||||
local public_location=("${installParameters[@]}")
|
||||
variations+=(public_location)
|
||||
|
||||
local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public")
|
||||
variations+=(dotnetbuilds)
|
||||
|
||||
if [[ -n "${6:-}" ]]; then
|
||||
variations+=(private_feed)
|
||||
local private_feed=("${installParameters[@]}" --azure-feed $6)
|
||||
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
|
||||
|
@ -219,22 +220,27 @@ function InstallDotNet {
|
|||
decodeArg="-d"
|
||||
fi
|
||||
decodedFeedKey=`echo $7 | base64 $decodeArg`
|
||||
runtimeSourceFeedKey="--feed-credential $decodedFeedKey"
|
||||
private_feed+=(--feed-credential $decodedFeedKey)
|
||||
fi
|
||||
fi
|
||||
|
||||
local installSuccess=0
|
||||
for variationName in "${variations[@]}"; do
|
||||
local name="$variationName[@]"
|
||||
local variation=("${!name}")
|
||||
echo "Attempting to install dotnet from $variationName."
|
||||
bash "$install_script" "${variation[@]}" && installSuccess=1
|
||||
if [[ "$installSuccess" -eq 1 ]]; then
|
||||
break
|
||||
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 [[ $exit_code != 0 ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')."
|
||||
fi
|
||||
ExitWithExitCode $exit_code
|
||||
fi
|
||||
}
|
||||
echo "Failed to install dotnet from $variationName."
|
||||
done
|
||||
|
||||
if [[ "$installSuccess" -eq 0 ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations."
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
}
|
||||
|
||||
function with_retries {
|
||||
|
@ -399,13 +405,6 @@ function StopProcesses {
|
|||
return 0
|
||||
}
|
||||
|
||||
function TryLogClientIpAddress () {
|
||||
echo 'Attempting to log this client''s IP for Azure Package feed telemetry purposes'
|
||||
if command -v curl > /dev/null; then
|
||||
curl -s 'http://co1.msedge.net/fdv2/diagnostics.aspx' | grep ' IP: ' || true
|
||||
fi
|
||||
}
|
||||
|
||||
function MSBuild {
|
||||
local args=$@
|
||||
if [[ "$pipelines_log" == true ]]; then
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cmake": "3.16.4"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21560.2",
|
||||
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.21560.2"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21609.4",
|
||||
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.21609.4"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue