Skip to content

Commit c2607be

Browse files
[main] Update dependencies from dotnet/arcade (#499)
[main] Update dependencies from dotnet/arcade - Disable CA1515 warning in tests
1 parent cbd0d62 commit c2607be

File tree

86 files changed

+2587
-3888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2587
-3888
lines changed

eng/Version.Details.xml

+2-2
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="9.0.0-beta.24172.4">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24260.2">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>c936d1bc358744730613d8ce54bc3e0294e5ea56</Sha>
8+
<Sha>480401b003bfd2eb989c315da5d6b99ad13a968c</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/common/build.ps1

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Param(
1919
[switch] $pack,
2020
[switch] $publish,
2121
[switch] $clean,
22-
[switch] $verticalBuild,
2322
[switch][Alias('pb')]$productBuild,
2423
[switch][Alias('bl')]$binaryLog,
2524
[switch][Alias('nobl')]$excludeCIBinarylog,
@@ -60,7 +59,6 @@ function Print-Usage() {
6059
Write-Host " -sign Sign build outputs"
6160
Write-Host " -publish Publish artifacts (e.g. symbols)"
6261
Write-Host " -clean Clean the solution"
63-
Write-Host " -verticalBuild Run in 'vertical build' infra mode."
6462
Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
6563
Write-Host ""
6664

@@ -124,7 +122,7 @@ function Build {
124122
/p:Deploy=$deploy `
125123
/p:Test=$test `
126124
/p:Pack=$pack `
127-
/p:DotNetBuildRepo=$($productBuild -or $verticalBuild) `
125+
/p:DotNetBuildRepo=$productBuild `
128126
/p:IntegrationTest=$integrationTest `
129127
/p:PerformanceTest=$performanceTest `
130128
/p:Sign=$sign `

eng/common/build.sh

-8
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
6262
restore=false
6363
build=false
6464
source_build=false
65-
vertical_build=false
6665
product_build=false
6766
rebuild=false
6867
test=false
@@ -141,13 +140,6 @@ while [[ $# > 0 ]]; do
141140
restore=true
142141
pack=true
143142
;;
144-
-verticalbuild|-vb)
145-
build=true
146-
vertical_build=true
147-
product_build=true
148-
restore=true
149-
pack=true
150-
;;
151143
-test|-t)
152144
test=true
153145
;;

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

+266
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
parameters:
2+
# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
3+
cancelTimeoutInMinutes: ''
4+
condition: ''
5+
container: ''
6+
continueOnError: false
7+
dependsOn: ''
8+
displayName: ''
9+
pool: ''
10+
steps: []
11+
strategy: ''
12+
timeoutInMinutes: ''
13+
variables: []
14+
workspace: ''
15+
templateContext: {}
16+
17+
# Job base template specific parameters
18+
# See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md
19+
# publishing defaults
20+
artifacts: ''
21+
enableMicrobuild: false
22+
enablePublishBuildArtifacts: false
23+
enablePublishBuildAssets: false
24+
enablePublishTestResults: false
25+
enablePublishUsingPipelines: false
26+
enableBuildRetry: false
27+
disableComponentGovernance: ''
28+
componentGovernanceIgnoreDirectories: ''
29+
mergeTestResults: false
30+
testRunTitle: ''
31+
testResultsFormat: ''
32+
name: ''
33+
preSteps: []
34+
artifactPublishSteps: []
35+
runAsPublic: false
36+
37+
# Sbom related params
38+
enableSbom: true
39+
PackageVersion: 9.0.0
40+
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
41+
42+
# 1es specific parameters
43+
is1ESPipeline: ''
44+
45+
jobs:
46+
- job: ${{ parameters.name }}
47+
48+
${{ if ne(parameters.cancelTimeoutInMinutes, '') }}:
49+
cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }}
50+
51+
${{ if ne(parameters.condition, '') }}:
52+
condition: ${{ parameters.condition }}
53+
54+
${{ if ne(parameters.container, '') }}:
55+
container: ${{ parameters.container }}
56+
57+
${{ if ne(parameters.continueOnError, '') }}:
58+
continueOnError: ${{ parameters.continueOnError }}
59+
60+
${{ if ne(parameters.dependsOn, '') }}:
61+
dependsOn: ${{ parameters.dependsOn }}
62+
63+
${{ if ne(parameters.displayName, '') }}:
64+
displayName: ${{ parameters.displayName }}
65+
66+
${{ if ne(parameters.pool, '') }}:
67+
pool: ${{ parameters.pool }}
68+
69+
${{ if ne(parameters.strategy, '') }}:
70+
strategy: ${{ parameters.strategy }}
71+
72+
${{ if ne(parameters.timeoutInMinutes, '') }}:
73+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
74+
75+
${{ if ne(parameters.templateContext, '') }}:
76+
templateContext: ${{ parameters.templateContext }}
77+
78+
variables:
79+
- ${{ if ne(parameters.enableTelemetry, 'false') }}:
80+
- name: DOTNET_CLI_TELEMETRY_PROFILE
81+
value: '$(Build.Repository.Uri)'
82+
- ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}:
83+
- name: EnableRichCodeNavigation
84+
value: 'true'
85+
# Retry signature validation up to three times, waiting 2 seconds between attempts.
86+
# See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures
87+
- name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY
88+
value: 3,2000
89+
- ${{ each variable in parameters.variables }}:
90+
# handle name-value variable syntax
91+
# example:
92+
# - name: [key]
93+
# value: [value]
94+
- ${{ if ne(variable.name, '') }}:
95+
- name: ${{ variable.name }}
96+
value: ${{ variable.value }}
97+
98+
# handle variable groups
99+
- ${{ if ne(variable.group, '') }}:
100+
- group: ${{ variable.group }}
101+
102+
# handle template variable syntax
103+
# example:
104+
# - template: path/to/template.yml
105+
# parameters:
106+
# [key]: [value]
107+
- ${{ if ne(variable.template, '') }}:
108+
- template: ${{ variable.template }}
109+
${{ if ne(variable.parameters, '') }}:
110+
parameters: ${{ variable.parameters }}
111+
112+
# handle key-value variable syntax.
113+
# example:
114+
# - [key]: [value]
115+
- ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}:
116+
- ${{ each pair in variable }}:
117+
- name: ${{ pair.key }}
118+
value: ${{ pair.value }}
119+
120+
# DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds
121+
- ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
122+
- group: DotNet-HelixApi-Access
123+
124+
${{ if ne(parameters.workspace, '') }}:
125+
workspace: ${{ parameters.workspace }}
126+
127+
steps:
128+
- ${{ if eq(parameters.is1ESPipeline, '') }}:
129+
- 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error
130+
131+
- ${{ if ne(parameters.preSteps, '') }}:
132+
- ${{ each preStep in parameters.preSteps }}:
133+
- ${{ preStep }}
134+
135+
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
136+
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
137+
- task: MicroBuildSigningPlugin@4
138+
displayName: Install MicroBuild plugin
139+
inputs:
140+
signType: $(_SignType)
141+
zipSources: false
142+
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
143+
env:
144+
TeamName: $(_TeamName)
145+
MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)'
146+
continueOnError: ${{ parameters.continueOnError }}
147+
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
148+
149+
- ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:
150+
- task: NuGetAuthenticate@1
151+
152+
- ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}:
153+
- task: DownloadPipelineArtifact@2
154+
inputs:
155+
buildType: current
156+
artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }}
157+
targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }}
158+
itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }}
159+
160+
- ${{ each step in parameters.steps }}:
161+
- ${{ step }}
162+
163+
- ${{ if eq(parameters.enableRichCodeNavigation, true) }}:
164+
- task: RichCodeNavIndexer@0
165+
displayName: RichCodeNav Upload
166+
inputs:
167+
languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }}
168+
environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'internal') }}
169+
richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
170+
uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
171+
continueOnError: true
172+
173+
- template: /eng/common/core-templates/steps/component-governance.yml
174+
parameters:
175+
is1ESPipeline: ${{ parameters.is1ESPipeline }}
176+
${{ if eq(parameters.disableComponentGovernance, '') }}:
177+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
178+
disableComponentGovernance: false
179+
${{ else }}:
180+
disableComponentGovernance: true
181+
${{ else }}:
182+
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
183+
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
184+
185+
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
186+
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
187+
- task: MicroBuildCleanup@1
188+
displayName: Execute Microbuild cleanup tasks
189+
condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
190+
continueOnError: ${{ parameters.continueOnError }}
191+
env:
192+
TeamName: $(_TeamName)
193+
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
194+
- template: /eng/common/core-templates/steps/generate-sbom.yml
195+
parameters:
196+
is1ESPipeline: ${{ parameters.is1ESPipeline }}
197+
PackageVersion: ${{ parameters.packageVersion}}
198+
BuildDropPath: ${{ parameters.buildDropPath }}
199+
IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
200+
publishArtifacts: false
201+
202+
# Publish test results
203+
- ${{ if and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')) }}:
204+
- ${{ if eq(parameters.testResultsFormat, 'xunit') }}:
205+
- task: PublishTestResults@2
206+
displayName: Publish XUnit Test Results
207+
inputs:
208+
testResultsFormat: 'xUnit'
209+
testResultsFiles: '*.xml'
210+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
211+
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit
212+
mergeTestResults: ${{ parameters.mergeTestResults }}
213+
continueOnError: true
214+
condition: always()
215+
- ${{ if eq(parameters.testResultsFormat, 'vstest') }}:
216+
- task: PublishTestResults@2
217+
displayName: Publish TRX Test Results
218+
inputs:
219+
testResultsFormat: 'VSTest'
220+
testResultsFiles: '*.trx'
221+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
222+
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx
223+
mergeTestResults: ${{ parameters.mergeTestResults }}
224+
continueOnError: true
225+
condition: always()
226+
227+
# gather artifacts
228+
- ${{ if ne(parameters.artifacts.publish, '') }}:
229+
- ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:
230+
- task: CopyFiles@2
231+
displayName: Gather binaries for publish to artifacts
232+
inputs:
233+
SourceFolder: 'artifacts/bin'
234+
Contents: '**'
235+
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin'
236+
- task: CopyFiles@2
237+
displayName: Gather packages for publish to artifacts
238+
inputs:
239+
SourceFolder: 'artifacts/packages'
240+
Contents: '**'
241+
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'
242+
- ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:
243+
- task: CopyFiles@2
244+
displayName: Gather logs for publish to artifacts
245+
inputs:
246+
SourceFolder: 'artifacts/log'
247+
Contents: '**'
248+
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log'
249+
250+
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
251+
- task: CopyFiles@2
252+
displayName: Gather logs for publish to artifacts
253+
inputs:
254+
SourceFolder: 'artifacts/log/$(_BuildConfig)'
255+
Contents: '**'
256+
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
257+
- ${{ if eq(parameters.enableBuildRetry, 'true') }}:
258+
- task: CopyFiles@2
259+
displayName: Gather buildconfiguration for build retry
260+
inputs:
261+
SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration'
262+
Contents: '**'
263+
TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration'
264+
265+
- ${{ each step in parameters.artifactPublishSteps }}:
266+
- ${{ step }}

0 commit comments

Comments
 (0)