@@ -24,7 +24,7 @@ parameters:
24
24
enablePublishBuildAssets : false
25
25
enablePublishTestResults : false
26
26
enablePublishUsingPipelines : false
27
- disableComponentGovernance : false
27
+ disableComponentGovernance : ' '
28
28
mergeTestResults : false
29
29
testRunTitle : ' '
30
30
testResultsFormat : ' '
73
73
- ${{ if eq(parameters.enableRichCodeNavigation, 'true') }} :
74
74
- name : EnableRichCodeNavigation
75
75
value : ' true'
76
+ # Retry signature validation up to three times, waiting 2 seconds between attempts.
77
+ # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures
78
+ - name : NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY
79
+ value : 3,2000
76
80
- ${{ each variable in parameters.variables }} :
77
81
# handle name-value variable syntax
78
82
# example:
81
85
- ${{ if ne(variable.name, '') }} :
82
86
- name : ${{ variable.name }}
83
87
value : ${{ variable.value }}
84
-
88
+
85
89
# handle variable groups
86
90
- ${{ if ne(variable.group, '') }} :
87
91
- group : ${{ variable.group }}
@@ -142,14 +146,20 @@ jobs:
142
146
richNavLogOutputDirectory : $(Build.SourcesDirectory)/artifacts/bin
143
147
continueOnError : true
144
148
145
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }} :
146
- - task : ComponentGovernanceComponentDetection@0
147
- continueOnError : true
149
+ - template : /eng/common/templates/steps/component-governance.yml
150
+ parameters :
151
+ ${{ if eq(parameters.disableComponentGovernance, '') }} :
152
+ ${{ 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'))) }} :
153
+ disableComponentGovernance : false
154
+ ${{ else }} :
155
+ disableComponentGovernance : true
156
+ ${{ else }} :
157
+ disableComponentGovernance : ${{ parameters.disableComponentGovernance }}
148
158
149
159
- ${{ if eq(parameters.enableMicrobuild, 'true') }} :
150
160
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
151
161
- task : MicroBuildCleanup@1
152
- displayName : Execute Microbuild cleanup tasks
162
+ displayName : Execute Microbuild cleanup tasks
153
163
condition : and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
154
164
continueOnError : ${{ parameters.continueOnError }}
155
165
env :
@@ -217,7 +227,7 @@ jobs:
217
227
displayName : Publish XUnit Test Results
218
228
inputs :
219
229
testResultsFormat : ' xUnit'
220
- testResultsFiles : ' *.xml'
230
+ testResultsFiles : ' *.xml'
221
231
searchFolder : ' $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
222
232
testRunTitle : ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit
223
233
mergeTestResults : ${{ parameters.mergeTestResults }}
@@ -228,7 +238,7 @@ jobs:
228
238
displayName : Publish TRX Test Results
229
239
inputs :
230
240
testResultsFormat : ' VSTest'
231
- testResultsFiles : ' *.trx'
241
+ testResultsFiles : ' *.trx'
232
242
searchFolder : ' $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
233
243
testRunTitle : ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx
234
244
mergeTestResults : ${{ parameters.mergeTestResults }}
0 commit comments