Skip to content

Commit 85e574c

Browse files
authored
[main] Source code updates from dotnet/dotnet (#49080)
2 parents 9e76ea7 + d96ec44 commit 85e574c

File tree

29 files changed

+1031
-437
lines changed

29 files changed

+1031
-437
lines changed

eng/Version.Details.xml

Lines changed: 227 additions & 227 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 113 additions & 111 deletions
Large diffs are not rendered by default.

eng/common/build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Param(
2121
[switch] $publish,
2222
[switch] $clean,
2323
[switch][Alias('pb')]$productBuild,
24+
[switch]$fromVMR,
2425
[switch][Alias('bl')]$binaryLog,
2526
[switch][Alias('nobl')]$excludeCIBinarylog,
2627
[switch] $ci,
@@ -74,6 +75,7 @@ function Print-Usage() {
7475
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
7576
Write-Host " -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
7677
Write-Host " -buildCheck Sets /check msbuild parameter"
78+
Write-Host " -fromVMR Set when building from within the VMR"
7779
Write-Host ""
7880

7981
Write-Host "Command line arguments not listed above are passed thru to msbuild."
@@ -127,7 +129,8 @@ function Build {
127129
/p:Deploy=$deploy `
128130
/p:Test=$test `
129131
/p:Pack=$pack `
130-
/p:DotNetBuildRepo=$productBuild `
132+
/p:DotNetBuild=$productBuild `
133+
/p:DotNetBuildFromVMR=$fromVMR `
131134
/p:IntegrationTest=$integrationTest `
132135
/p:PerformanceTest=$performanceTest `
133136
/p:Sign=$sign `

eng/common/build.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ usage()
4343
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
4444
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
4545
echo " --buildCheck <value> Sets /check msbuild parameter"
46+
echo " --fromVMR Set when building from within the VMR"
4647
echo ""
4748
echo "Command line arguments not listed above are passed thru to msbuild."
4849
echo "Arguments can also be passed in with a single hyphen."
@@ -64,6 +65,7 @@ restore=false
6465
build=false
6566
source_build=false
6667
product_build=false
68+
from_vmr=false
6769
rebuild=false
6870
test=false
6971
integration_test=false
@@ -89,7 +91,7 @@ verbosity='minimal'
8991
runtime_source_feed=''
9092
runtime_source_feed_key=''
9193

92-
properties=''
94+
properties=()
9395
while [[ $# > 0 ]]; do
9496
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
9597
case "$opt" in
@@ -129,19 +131,22 @@ while [[ $# > 0 ]]; do
129131
-pack)
130132
pack=true
131133
;;
132-
-sourcebuild|-sb)
134+
-sourcebuild|-source-build|-sb)
133135
build=true
134136
source_build=true
135137
product_build=true
136138
restore=true
137139
pack=true
138140
;;
139-
-productbuild|-pb)
141+
-productbuild|-product-build|-pb)
140142
build=true
141143
product_build=true
142144
restore=true
143145
pack=true
144146
;;
147+
-fromvmr|-from-vmr)
148+
from_vmr=true
149+
;;
145150
-test|-t)
146151
test=true
147152
;;
@@ -187,7 +192,7 @@ while [[ $# > 0 ]]; do
187192
shift
188193
;;
189194
*)
190-
properties="$properties $1"
195+
properties+=("$1")
191196
;;
192197
esac
193198

@@ -221,7 +226,7 @@ function Build {
221226
InitializeCustomToolset
222227

223228
if [[ ! -z "$projects" ]]; then
224-
properties="$properties /p:Projects=$projects"
229+
properties+=("/p:Projects=$projects")
225230
fi
226231

227232
local bl=""
@@ -241,8 +246,9 @@ function Build {
241246
/p:RepoRoot="$repo_root" \
242247
/p:Restore=$restore \
243248
/p:Build=$build \
244-
/p:DotNetBuildRepo=$product_build \
249+
/p:DotNetBuild=$product_build \
245250
/p:DotNetBuildSourceOnly=$source_build \
251+
/p:DotNetBuildFromVMR=$from_vmr \
246252
/p:Rebuild=$rebuild \
247253
/p:Test=$test \
248254
/p:Pack=$pack \
@@ -251,7 +257,7 @@ function Build {
251257
/p:Sign=$sign \
252258
/p:Publish=$publish \
253259
/p:RestoreStaticGraphEnableBinaryLogger=$binary_log \
254-
$properties
260+
${properties[@]+"${properties[@]}"}
255261

256262
ExitWithExitCode 0
257263
}

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

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ parameters:
3232
# Optional: 🌤️ or not the build has assets it wants to publish to BAR
3333
isAssetlessBuild: false
3434

35+
# Optional, publishing version
36+
publishingVersion: 3
37+
38+
# Optional: A minimatch pattern for the asset manifests to publish to BAR
39+
assetManifestsPattern: '*/manifests/**/*.xml'
40+
3541
jobs:
3642
- job: Asset_Registry_Publish
3743

@@ -77,13 +83,31 @@ jobs:
7783
clean: true
7884

7985
- ${{ if eq(parameters.isAssetlessBuild, 'false') }}:
80-
- task: DownloadPipelineArtifact@2
81-
displayName: Download Asset Manifests
82-
inputs:
83-
artifactName: AssetManifests
84-
targetPath: '$(Build.StagingDirectory)/AssetManifests'
85-
condition: ${{ parameters.condition }}
86-
continueOnError: ${{ parameters.continueOnError }}
86+
- ${{ if eq(parameters.publishingVersion, 3) }}:
87+
- task: DownloadPipelineArtifact@2
88+
displayName: Download Asset Manifests
89+
inputs:
90+
artifactName: AssetManifests
91+
targetPath: '$(Build.StagingDirectory)/AssetManifests'
92+
condition: ${{ parameters.condition }}
93+
continueOnError: ${{ parameters.continueOnError }}
94+
- ${{ if eq(parameters.publishingVersion, 4) }}:
95+
- task: DownloadPipelineArtifact@2
96+
displayName: Download V4 asset manifests
97+
inputs:
98+
itemPattern: '*/manifests/**/*.xml'
99+
targetPath: '$(Build.StagingDirectory)/AllAssetManifests'
100+
condition: ${{ parameters.condition }}
101+
continueOnError: ${{ parameters.continueOnError }}
102+
- task: CopyFiles@2
103+
displayName: Copy V4 asset manifests to AssetManifests
104+
inputs:
105+
SourceFolder: '$(Build.StagingDirectory)/AllAssetManifests'
106+
Contents: ${{ parameters.assetManifestsPattern }}
107+
TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
108+
flattenFolders: true
109+
condition: ${{ parameters.condition }}
110+
continueOnError: ${{ parameters.continueOnError }}
87111

88112
- task: NuGetAuthenticate@1
89113

@@ -120,6 +144,17 @@ jobs:
120144
Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs"
121145
}
122146
147+
- ${{ if eq(parameters.publishingVersion, 4) }}:
148+
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
149+
parameters:
150+
is1ESPipeline: ${{ parameters.is1ESPipeline }}
151+
args:
152+
targetPath: '$(Build.ArtifactStagingDirectory)/MergedManifest.xml'
153+
artifactName: AssetManifests
154+
displayName: 'Publish Merged Manifest'
155+
retryCountOnTaskFailure: 10 # for any logs being locked
156+
sbomEnabled: false # we don't need SBOM for logs
157+
123158
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
124159
parameters:
125160
is1ESPipeline: ${{ parameters.is1ESPipeline }}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ stages:
193193
buildId: $(AzDOBuildId)
194194
artifactName: PackageArtifacts
195195
checkDownloadedFiles: true
196-
itemPattern: |
197-
**
198-
!**/Microsoft.SourceBuild.Intermediate.*.nupkg
199196

200197
# This is necessary whenever we want to publish/restore to an AzDO private feed
201198
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here

eng/common/core-templates/steps/install-microbuild.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -48,38 +48,3 @@ steps:
4848
eq(variables['_SignType'], 'real')
4949
)
5050
))
51-
52-
# Workaround for ESRP CLI on Linux - https://github.com/dotnet/source-build/issues/4964
53-
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:
54-
- task: UseDotNet@2
55-
displayName: Install .NET 9.0 SDK for ESRP CLI Workaround
56-
inputs:
57-
packageType: sdk
58-
version: 9.0.x
59-
installationPath: ${{ parameters.microBuildOutputFolder }}/.dotnet
60-
workingDirectory: ${{ parameters.microBuildOutputFolder }}
61-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
62-
63-
- task: PowerShell@2
64-
displayName: Workaround for ESRP CLI on Linux
65-
inputs:
66-
targetType: 'inline'
67-
script: |
68-
Write-Host "Copying Linux Path"
69-
$MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
70-
$MBSIGN_APPFOLDER = ($MBSIGN_APPFOLDER -replace '/build', '')
71-
72-
$versionRegex = '\d+\.\d+\.\d+'
73-
$package = Get-ChildItem -Path $MBSIGN_APPFOLDER -Directory |
74-
Where-Object { $_.Name -match $versionRegex }
75-
76-
if ($package.Count -ne 1) {
77-
Write-Host "There should be exactly one matching subfolder, but found $($package.Count)."
78-
exit 1
79-
}
80-
81-
$MBSIGN_APPFOLDER = $package[0].FullName + '/build'
82-
$MBSIGN_APPFOLDER | Write-Host
83-
$SignConfigPath = $MBSIGN_APPFOLDER + '/signconfig.xml'
84-
Copy-Item -Path "$(MBSIGN_APPFOLDER)/signconfig.xml" -Destination $SignConfigPath -Force
85-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))

eng/common/sdl/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Guardian.Cli" version="0.109.0"/>
3+
<package id="Microsoft.Guardian.Cli" version="0.199.0"/>
44
</packages>

0 commit comments

Comments
 (0)