Skip to content

Commit 591391e

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20211209.4 (#39030)
[release/6.0] Update dependencies from dotnet/arcade
1 parent 35ae498 commit 591391e

File tree

8 files changed

+82
-94
lines changed

8 files changed

+82
-94
lines changed

eng/Version.Details.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,22 +280,22 @@
280280
<Uri>https://github.com/dotnet/runtime</Uri>
281281
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
282282
</Dependency>
283-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21560.2">
283+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21609.4">
284284
<Uri>https://github.com/dotnet/arcade</Uri>
285-
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
285+
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
286286
<SourceBuild RepoName="arcade" ManagedOnly="true" />
287287
</Dependency>
288-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21560.2">
288+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21609.4">
289289
<Uri>https://github.com/dotnet/arcade</Uri>
290-
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
290+
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
291291
</Dependency>
292-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21560.2">
292+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21609.4">
293293
<Uri>https://github.com/dotnet/arcade</Uri>
294-
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
294+
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
295295
</Dependency>
296-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21560.2">
296+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21609.4">
297297
<Uri>https://github.com/dotnet/arcade</Uri>
298-
<Sha>ee9b7f19853685805c612103282c8d9486c7db86</Sha>
298+
<Sha>7421b55f46aff8373764016d942b23cbf87c75cb</Sha>
299299
</Dependency>
300300
</ToolsetDependencies>
301301
</Dependencies>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@
133133
<MicrosoftEntityFrameworkCoreVersion>6.0.0</MicrosoftEntityFrameworkCoreVersion>
134134
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.0</MicrosoftEntityFrameworkCoreDesignVersion>
135135
<!-- Packages from dotnet/arcade -->
136-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21560.2</MicrosoftDotNetBuildTasksInstallersVersion>
137-
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21560.2</MicrosoftDotNetBuildTasksTemplatingVersion>
136+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21609.4</MicrosoftDotNetBuildTasksInstallersVersion>
137+
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21609.4</MicrosoftDotNetBuildTasksTemplatingVersion>
138138
</PropertyGroup>
139139
<!--
140140

eng/common/build.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ function InitializeCustomToolset {
188188

189189
function Build {
190190

191-
if [[ "$ci" == true ]]; then
192-
TryLogClientIpAddress
193-
fi
194191
InitializeToolset
195192
InitializeCustomToolset
196193

eng/common/sdk-task.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ try {
8383
}
8484

8585
if ($restore) {
86-
if ($ci) {
87-
Try-LogClientIpAddress
88-
}
8986
Build 'Restore'
9087
}
9188

eng/common/templates/job/onelocbuild.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ parameters:
1212
SourcesDirectory: $(Build.SourcesDirectory)
1313
CreatePr: true
1414
AutoCompletePr: false
15+
ReusePr: true
1516
UseLfLineEndings: true
1617
UseCheckedInLocProjectJson: false
1718
LanguageSet: VS_Main_Languages
@@ -64,6 +65,8 @@ jobs:
6465
${{ if eq(parameters.CreatePr, true) }}:
6566
isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
6667
isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
68+
${{ if eq(parameters.RepoType, 'gitHub') }}:
69+
isShouldReusePrSelected: ${{ parameters.ReusePr }}
6770
packageSourceAuth: patAuth
6871
patVariable: ${{ parameters.CeapexPat }}
6972
${{ if eq(parameters.RepoType, 'gitHub') }}:

eng/common/tools.ps1

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
163163
# Disable telemetry on CI.
164164
if ($ci) {
165165
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
166-
167-
# In case of network error, try to log the current IP for reference
168-
Try-LogClientIpAddress
169166
}
170167

171168
# Source Build uses DotNetCoreSdkDir variable
@@ -301,32 +298,45 @@ function InstallDotNet([string] $dotnetRoot,
301298
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
302299
if ($noPath) { $installParameters.NoPath = $True }
303300

304-
try {
305-
& $installScript @installParameters
306-
}
307-
catch {
308-
if ($runtimeSourceFeed -or $runtimeSourceFeedKey) {
309-
Write-Host "Failed to install dotnet from public location. Trying from '$runtimeSourceFeed'"
310-
if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
301+
$variations = @()
302+
$variations += @($installParameters)
311303

312-
if ($runtimeSourceFeedKey) {
313-
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
314-
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
315-
$installParameters.FeedCredential = $decodedString
316-
}
304+
$dotnetBuilds = $installParameters.Clone()
305+
$dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public"
306+
$variations += @($dotnetBuilds)
317307

318-
try {
319-
& $installScript @installParameters
320-
}
321-
catch {
322-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from custom location '$runtimeSourceFeed'."
323-
ExitWithExitCode 1
324-
}
308+
if ($runtimeSourceFeed) {
309+
$runtimeSource = $installParameters.Clone()
310+
$runtimeSource.AzureFeed = $runtimeSourceFeed
311+
if ($runtimeSourceFeedKey) {
312+
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
313+
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
314+
$runtimeSource.FeedCredential = $decodedString
315+
}
316+
$variations += @($runtimeSource)
317+
}
318+
319+
$installSuccess = $false
320+
foreach ($variation in $variations) {
321+
if ($variation | Get-Member AzureFeed) {
322+
$location = $variation.AzureFeed
325323
} else {
326-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from public location."
327-
ExitWithExitCode 1
324+
$location = "public location";
325+
}
326+
Write-Host "Attempting to install dotnet from $location."
327+
try {
328+
& $installScript @variation
329+
$installSuccess = $true
330+
break
331+
}
332+
catch {
333+
Write-Host "Failed to install dotnet from $location."
328334
}
329335
}
336+
if (-not $installSuccess) {
337+
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations."
338+
ExitWithExitCode 1
339+
}
330340
}
331341

332342
#
@@ -882,24 +892,6 @@ if (!$disableConfigureToolsetImport) {
882892
}
883893
}
884894

885-
function Try-LogClientIpAddress()
886-
{
887-
Write-Host "Attempting to log this client's IP for Azure Package feed telemetry purposes"
888-
try
889-
{
890-
$result = Invoke-WebRequest -Uri "http://co1.msedge.net/fdv2/diagnostics.aspx" -UseBasicParsing
891-
$lines = $result.Content.Split([Environment]::NewLine)
892-
$socketIp = $lines | Select-String -Pattern "^Socket IP:.*"
893-
Write-Host $socketIp
894-
$clientIp = $lines | Select-String -Pattern "^Client IP:.*"
895-
Write-Host $clientIp
896-
}
897-
catch
898-
{
899-
Write-Host "Unable to get this machine's effective IP address for logging: $_"
900-
}
901-
}
902-
903895
#
904896
# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic.
905897
#

eng/common/tools.sh

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -188,28 +188,29 @@ function InstallDotNet {
188188
GetDotNetInstallScript "$root"
189189
local install_script=$_GetDotNetInstallScript
190190

191-
local archArg=''
191+
local installParameters=(--version $version --install-dir "$root")
192+
192193
if [[ -n "${3:-}" ]] && [ "$3" != 'unset' ]; then
193-
archArg="--architecture $3"
194+
installParameters+=(--architecture $3)
194195
fi
195-
local runtimeArg=''
196196
if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then
197-
runtimeArg="--runtime $4"
197+
installParameters+=(--runtime $4)
198198
fi
199-
local skipNonVersionedFilesArg=""
200199
if [[ "$#" -ge "5" ]] && [[ "$5" != 'false' ]]; then
201-
skipNonVersionedFilesArg="--skip-non-versioned-files"
200+
installParameters+=(--skip-non-versioned-files)
202201
fi
203-
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
204-
local exit_code=$?
205-
echo "Failed to install dotnet SDK from public location (exit code '$exit_code')."
206202

207-
local runtimeSourceFeed=''
208-
if [[ -n "${6:-}" ]]; then
209-
runtimeSourceFeed="--azure-feed $6"
210-
fi
203+
local variations=() # list of variable names with parameter arrays in them
204+
205+
local public_location=("${installParameters[@]}")
206+
variations+=(public_location)
211207

212-
local runtimeSourceFeedKey=''
208+
local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public")
209+
variations+=(dotnetbuilds)
210+
211+
if [[ -n "${6:-}" ]]; then
212+
variations+=(private_feed)
213+
local private_feed=("${installParameters[@]}" --azure-feed $6)
213214
if [[ -n "${7:-}" ]]; then
214215
# The 'base64' binary on alpine uses '-d' and doesn't support '--decode'
215216
# '-d'. To work around this, do a simple detection and switch the parameter
@@ -219,22 +220,27 @@ function InstallDotNet {
219220
decodeArg="-d"
220221
fi
221222
decodedFeedKey=`echo $7 | base64 $decodeArg`
222-
runtimeSourceFeedKey="--feed-credential $decodedFeedKey"
223+
private_feed+=(--feed-credential $decodedFeedKey)
223224
fi
225+
fi
224226

225-
if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then
226-
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || {
227-
local exit_code=$?
228-
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
229-
ExitWithExitCode $exit_code
230-
}
231-
else
232-
if [[ $exit_code != 0 ]]; then
233-
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')."
234-
fi
235-
ExitWithExitCode $exit_code
227+
local installSuccess=0
228+
for variationName in "${variations[@]}"; do
229+
local name="$variationName[@]"
230+
local variation=("${!name}")
231+
echo "Attempting to install dotnet from $variationName."
232+
bash "$install_script" "${variation[@]}" && installSuccess=1
233+
if [[ "$installSuccess" -eq 1 ]]; then
234+
break
236235
fi
237-
}
236+
237+
echo "Failed to install dotnet from $variationName."
238+
done
239+
240+
if [[ "$installSuccess" -eq 0 ]]; then
241+
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations."
242+
ExitWithExitCode 1
243+
fi
238244
}
239245

240246
function with_retries {
@@ -399,13 +405,6 @@ function StopProcesses {
399405
return 0
400406
}
401407

402-
function TryLogClientIpAddress () {
403-
echo 'Attempting to log this client''s IP for Azure Package feed telemetry purposes'
404-
if command -v curl > /dev/null; then
405-
curl -s 'http://co1.msedge.net/fdv2/diagnostics.aspx' | grep ' IP: ' || true
406-
fi
407-
}
408-
409408
function MSBuild {
410409
local args=$@
411410
if [[ "$pipelines_log" == true ]]; then

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"msbuild-sdks": {
3131
"Yarn.MSBuild": "1.22.10",
32-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21560.2",
33-
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21560.2"
32+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21609.4",
33+
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21609.4"
3434
}
3535
}

0 commit comments

Comments
 (0)