Skip to content

Commit c29280d

Browse files
authored
Merge pull request #682 from dotnet/darc-main-b5f19994-120c-42ab-b0f6-b58bcabdecdc
[main] Update dependencies from dotnet/arcade
2 parents b7a4b57 + 1c6a950 commit c29280d

12 files changed

Lines changed: 128 additions & 67 deletions

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26325.1">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26360.7">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>b076228a542025c4f879f254d38adb5cf34a2475</Sha>
8+
<Sha>3169db01948537e61a9102477fab4a39663ba79d</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/common/SetupNugetSources.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
1414
# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
1515
# env:
16-
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
16+
# Token: $(InternalFeedToken)
17+
#
18+
# Note: This logic is abstracted into enable-internal-sources.yml, which uses
19+
# NuGetAuthenticate or a WIF-backed service connection. Prefer that template
20+
# over calling this script directly.
1721
#
1822
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
1923
# This ensures that:

eng/common/core-templates/job/helix-job-monitor.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ parameters:
5757
type: number
5858
default: 30
5959

60+
# When 'true' (the default), Helix work items that exit 0 but have failed AzDO test results
61+
# are treated as failed: they count toward the monitor's exit code and are resubmitted by a
62+
# later invocation's retry pass. Set to 'false' to fall back to exit-code-only outcomes.
63+
# Forwarded as --fail-on-failed-tests.
64+
- name: failWorkItemsWithFailedTests
65+
type: boolean
66+
default: true
67+
6068
# Advanced: optional pipeline artifact (produced earlier in this run) that contains the tool
6169
# nupkg. When set, the artifact is downloaded and the tool is installed from the nupkg into
6270
# a local tool-path; this bypasses the repo's .config/dotnet-tools.json manifest and is
@@ -170,6 +178,7 @@ jobs:
170178
toolArgs=(
171179
--helix-base-uri '${{ parameters.helixBaseUri }}'
172180
--polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}'
181+
--fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}'
173182
--max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully.
174183
--stage-name '$(System.StageName)'
175184
)

eng/common/core-templates/job/publish-build-assets.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ jobs:
122122

123123
# Populate internal runtime variables.
124124
- template: /eng/common/templates/steps/enable-internal-sources.yml
125-
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
126-
parameters:
127-
legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)
128125

129126
- template: /eng/common/templates/steps/enable-internal-runtimes.yml
130127

eng/common/core-templates/post-build/post-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ stages:
295295

296296
# Populate internal runtime variables.
297297
- template: /eng/common/templates/steps/enable-internal-sources.yml
298-
parameters:
299-
legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)
300298

301299
- template: /eng/common/templates/steps/enable-internal-runtimes.yml
302300

eng/common/cross/build-rootfs.sh

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ usage()
1818
echo "--skipsigcheck - optional, will skip package signature checks (allowing untrusted packages)."
1919
echo "--skipemulation - optional, will skip qemu and debootstrap requirement when building environment for debian based systems."
2020
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
21-
echo "--jobs N - optional, restrict to N jobs."
21+
echo "--ubuntu-repo <url> - optional, override the Ubuntu apt repository base URL."
22+
echo "--debian-repo <url> - optional, override the Debian apt repository base URL."
23+
echo "--alpine-repo <url> - optional, override the Alpine Linux repository base URL."
24+
echo "--jobs N (or --use-jobs N) - optional, restrict to N jobs."
2225
exit 1
2326
}
2427

@@ -144,6 +147,9 @@ __KeyringFile="/usr/share/keyrings/ubuntu-archive-keyring.gpg"
144147
__SkipSigCheck=0
145148
__SkipEmulation=0
146149
__UseMirror=0
150+
__UbuntuRepoOverride=
151+
__DebianRepoOverride=
152+
__AlpineRepoOverride=
147153

148154
__UnprocessedBuildArgs=
149155
while :; do
@@ -397,6 +403,31 @@ while :; do
397403
--use-mirror)
398404
__UseMirror=1
399405
;;
406+
--ubuntu-repo|-ubuntu-repo)
407+
shift
408+
if [[ "$#" -le 0 ]]; then
409+
echo "ERROR: --ubuntu-repo requires a URL argument."
410+
usage
411+
fi
412+
__UbuntuRepoOverride="$1"
413+
;;
414+
--debian-repo|-debian-repo)
415+
shift
416+
if [[ "$#" -le 0 ]]; then
417+
echo "ERROR: --debian-repo requires a URL argument."
418+
usage
419+
fi
420+
__DebianRepoOverride="$1"
421+
;;
422+
--alpine-repo|-alpine-repo)
423+
shift
424+
if [[ "$#" -le 0 ]]; then
425+
echo "ERROR: --alpine-repo requires a URL argument."
426+
usage
427+
fi
428+
__AlpineRepoOverride="$1"
429+
;;
430+
# Removed duplicate/invalid option handling block (was breaking case statement parsing).
400431
--use-jobs)
401432
shift
402433
MAXJOBS=$1
@@ -446,6 +477,12 @@ if [[ -z "$__UbuntuRepo" ]]; then
446477
__UbuntuRepo="https://ports.ubuntu.com/"
447478
fi
448479

480+
if [[ -n "$__UbuntuRepoOverride" && "$__KeyringFile" == *ubuntu* ]]; then
481+
__UbuntuRepo="$__UbuntuRepoOverride"
482+
elif [[ -n "$__DebianRepoOverride" && "$__KeyringFile" == *debian* ]]; then
483+
__UbuntuRepo="$__DebianRepoOverride"
484+
fi
485+
449486
if [[ -n "$__LLVM_MajorVersion" ]]; then
450487
__UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev"
451488
fi
@@ -486,6 +523,7 @@ if [[ "$__CodeName" == "alpine" ]]; then
486523
__ApkToolsDir="$(mktemp -d)"
487524
__ApkKeysDir="$(mktemp -d)"
488525
arch="$(uname -m)"
526+
__AlpineRepo="${__AlpineRepoOverride:-https://dl-cdn.alpinelinux.org/alpine}"
489527

490528
ensureDownloadTool
491529

@@ -530,24 +568,24 @@ if [[ "$__CodeName" == "alpine" ]]; then
530568
# initialize DB
531569
# shellcheck disable=SC2086
532570
"$__ApkToolsDir/apk.static" \
533-
-X "https://dl-cdn.alpinelinux.org/alpine/$version/main" \
534-
-X "https://dl-cdn.alpinelinux.org/alpine/$version/community" \
571+
-X "$__AlpineRepo/$version/main" \
572+
-X "$__AlpineRepo/$version/community" \
535573
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" --initdb add
536574

537575
if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then
538576
# shellcheck disable=SC2086
539577
__AlpinePackages+=" $("$__ApkToolsDir/apk.static" \
540-
-X "https://dl-cdn.alpinelinux.org/alpine/$version/main" \
541-
-X "https://dl-cdn.alpinelinux.org/alpine/$version/community" \
578+
-X "$__AlpineRepo/$version/main" \
579+
-X "$__AlpineRepo/$version/community" \
542580
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \
543581
search 'llvm*-libs' | grep -E '^llvm' | sort | tail -1 | sed 's/-[^-]*//2g')"
544582
fi
545583

546584
# install all packages in one go
547585
# shellcheck disable=SC2086
548586
"$__ApkToolsDir/apk.static" \
549-
-X "https://dl-cdn.alpinelinux.org/alpine/$version/main" \
550-
-X "https://dl-cdn.alpinelinux.org/alpine/$version/community" \
587+
-X "$__AlpineRepo/$version/main" \
588+
-X "$__AlpineRepo/$version/community" \
551589
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" $__NoEmulationArg \
552590
add $__AlpinePackages
553591

eng/common/dotnet-install.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ Param(
44
[string] $architecture = '',
55
[string] $version = 'Latest',
66
[string] $runtime = 'dotnet',
7+
[string] $dotnetPath = '',
78
[string] $RuntimeSourceFeed = '',
89
[string] $RuntimeSourceFeedKey = ''
910
)
1011

1112
. $PSScriptRoot\tools.ps1
1213

13-
if (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {
14+
if (-not [string]::IsNullOrEmpty($dotnetPath)) {
15+
$dotnetRoot = $dotnetPath
16+
} elseif (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {
1417
$dotnetRoot = $env:DOTNET_GLOBAL_INSTALL_DIR
1518
} else {
1619
$dotnetRoot = Join-Path $RepoRoot '.dotnet'

eng/common/dotnet-install.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
1616
version='Latest'
1717
architecture=''
1818
runtime='dotnet'
19+
dotnetPath=''
1920
runtimeSourceFeed=''
2021
runtimeSourceFeedKey=''
2122
while [[ $# -gt 0 ]]; do
@@ -33,6 +34,10 @@ while [[ $# -gt 0 ]]; do
3334
shift
3435
runtime="$1"
3536
;;
37+
-dotnetpath)
38+
shift
39+
dotnetPath="$1"
40+
;;
3641
-runtimesourcefeed)
3742
shift
3843
runtimeSourceFeed="$1"
@@ -80,7 +85,9 @@ case $cpuname in
8085
;;
8186
esac
8287

83-
if [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then
88+
if [[ -n "${dotnetPath:-}" ]]; then
89+
dotnetRoot="$dotnetPath"
90+
elif [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then
8491
dotnetRoot="$DOTNET_GLOBAL_INSTALL_DIR"
8592
else
8693
dotnetRoot="${repo_root}.dotnet"

eng/common/native/NativeAotSupported.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<!-- Reject unsupported architectures via RID suffix match -->
1414
<_NativeAotSupportedArch Condition="
1515
'$(TargetArchitecture)' != 'wasm' and
16+
'$(TargetArchitecture)' != 's390x' and
17+
'$(TargetArchitecture)' != 'ppc64le' and
1618
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
1719
">true</_NativeAotSupportedArch>
1820

eng/common/tools.ps1

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,31 @@ function InitializeVisualStudioMSBuild([object]$vsRequirements = $null) {
432432
$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
433433

434434
$local:BinFolder = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin"
435-
$local:Prefer64bit = if (Get-Member -InputObject $vsRequirements -Name 'Prefer64bit') { $vsRequirements.Prefer64bit } else { $false }
436-
if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder "amd64"))) {
437-
$global:_MSBuildExe = Join-Path $local:BinFolder "amd64\msbuild.exe"
438-
} else {
439-
$global:_MSBuildExe = Join-Path $local:BinFolder "msbuild.exe"
435+
436+
# Use the MSBuild matching the host's process architecture (e.g. amd64 or arm64),
437+
# falling back to the 32-bit MSBuild in the root Bin folder when no matching subfolder exists.
438+
439+
# Determine the architecture of the current process, accounting for a 32-bit process
440+
# running on a 64-bit OS (PROCESSOR_ARCHITEW6432 holds the real machine architecture).
441+
$local:ProcessArchitecture = $env:PROCESSOR_ARCHITECTURE
442+
if (($local:ProcessArchitecture -eq 'x86') -and ($env:PROCESSOR_ARCHITEW6432)) {
443+
$local:ProcessArchitecture = $env:PROCESSOR_ARCHITEW6432
444+
}
445+
446+
# Map the architecture to the corresponding MSBuild subfolder. The 32-bit MSBuild lives in the
447+
# root Bin folder, so x86 maps to an empty subfolder.
448+
$local:MSBuildArchSubFolder = switch ($local:ProcessArchitecture) {
449+
'AMD64' { 'amd64' }
450+
'ARM64' { 'arm64' }
451+
default { '' }
452+
}
453+
454+
$global:_MSBuildExe = Join-Path $local:BinFolder "msbuild.exe"
455+
if ($local:MSBuildArchSubFolder) {
456+
$local:ArchMSBuildExe = Join-Path $local:BinFolder (Join-Path $local:MSBuildArchSubFolder "msbuild.exe")
457+
if (Test-Path $local:ArchMSBuildExe) {
458+
$global:_MSBuildExe = $local:ArchMSBuildExe
459+
}
440460
}
441461

442462
return $global:_MSBuildExe
@@ -531,6 +551,16 @@ function LocateVisualStudio([object]$vsRequirements = $null){
531551
}
532552

533553
function InitializeBuildTool() {
554+
# Allow a caller (e.g. a bootstrap script running out-of-proc) to inject the build tool via
555+
# environment variables instead of the in-proc $global:_BuildTool variable. Only Path and
556+
# Command are consumed by the MSBuild function below, so those are all that's needed.
557+
if ($env:_BuildToolPath) {
558+
return $global:_BuildTool = @{
559+
Path = $env:_BuildToolPath
560+
Command = $env:_BuildToolCommand
561+
}
562+
}
563+
534564
if (Test-Path variable:global:_BuildTool) {
535565
# If the requested msbuild parameters do not match, clear the cached variables.
536566
if($global:_BuildTool.Contains('ExcludePrereleaseVS') -and $global:_BuildTool.ExcludePrereleaseVS -ne $excludePrereleaseVS) {
@@ -558,7 +588,7 @@ function InitializeBuildTool() {
558588
}
559589
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
560590

561-
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net' }
591+
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild' }
562592
} elseif ($msbuildEngine -eq "vs") {
563593
try {
564594
$msbuildPath = InitializeVisualStudioMSBuild
@@ -567,7 +597,7 @@ function InitializeBuildTool() {
567597
ExitWithExitCode 1
568598
}
569599

570-
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "netframework"; ExcludePrereleaseVS = $excludePrereleaseVS }
600+
$buildTool = @{ Path = $msbuildPath; Command = ""; ExcludePrereleaseVS = $excludePrereleaseVS }
571601
} else {
572602
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
573603
ExitWithExitCode 1
@@ -706,7 +736,7 @@ function InitializeToolset() {
706736
}
707737

708738
function ExitWithExitCode([int] $exitCode) {
709-
if ($ci -and $prepareMachine) {
739+
if ($prepareMachine) {
710740
Stop-Processes
711741
}
712742
exit $exitCode
@@ -741,13 +771,6 @@ function MSBuild() {
741771
Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build, or explicitly opted-out from with the -excludeCIBinarylog switch.'
742772
ExitWithExitCode 1
743773
}
744-
745-
# Node reuse must be disabled in CI builds unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
746-
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
747-
if ($nodeReuse -and $env:MSBUILD_NODEREUSE_ENABLED -ne "1") {
748-
Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'
749-
ExitWithExitCode 1
750-
}
751774
}
752775

753776
$buildTool = InitializeBuildTool
@@ -789,11 +812,6 @@ function MSBuild() {
789812
# The build already logged an error, that's the reason it failed. Producing an error here only adds noise.
790813
Write-Host "Build failed with exit code $exitCode. Check errors above." -ForegroundColor Red
791814

792-
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
793-
if ($null -ne $buildLog) {
794-
Write-Host "See log: $buildLog" -ForegroundColor DarkGray
795-
}
796-
797815
# When running on Azure Pipelines, override the returned exit code to avoid double logging.
798816
# Skip this when the build is a child of the VMR build.
799817
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) {
@@ -841,23 +859,6 @@ function DotNet() {
841859
}
842860
}
843861

844-
function GetMSBuildBinaryLogCommandLineArgument($arguments) {
845-
foreach ($argument in $arguments) {
846-
if ($argument -ne $null) {
847-
$arg = $argument.Trim()
848-
if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) {
849-
return $arg.Substring('/bl:'.Length)
850-
}
851-
852-
if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {
853-
return $arg.Substring('/binaryLogger:'.Length)
854-
}
855-
}
856-
}
857-
858-
return $null
859-
}
860-
861862
function GetExecutableFileName($baseName) {
862863
if (IsWindowsPlatform) {
863864
return "$baseName.exe"

0 commit comments

Comments
 (0)