@@ -29,14 +29,17 @@ parameters:
2929- name : artifact_names
3030 type : object
3131 default :
32- - build_logs
33- - coverageResults
34- - deployables
35- - projectAssetsJson
36- - symbols
37- - testResults
38- - test_symbols
39- - Variables
32+ - name : build_logs
33+ - name : coverageResults
34+ - name : deployables
35+ sbomEnabled : true
36+ - name : projectAssetsJson
37+ - name : symbols
38+ - name : testResults
39+ testOnly : true
40+ - name : test_symbols
41+ testOnly : true
42+ - name : Variables
4043# The Enable*Build parameters turn non-Windows agents on or off.
4144# Their default value should be based on whether the build and tests are expected/required to pass on that platform.
4245# Callers (e.g. Official.yml) *may* expose these parameters at queue-time in order to turn OFF optional agents.
@@ -57,6 +60,11 @@ parameters:
5760- name : Is1ESPT
5861 type : boolean
5962
63+ # Indicates whether the 'official' 1ES PT templates are being used (as opposed to the unofficial ones).
64+ - name : Is1ESPTOfficial
65+ type : boolean
66+ default : false
67+
6068- name : RealSign
6169 type : boolean
6270 default : false
@@ -148,13 +156,21 @@ jobs:
148156
149157 outputParentDirectory : $(Build.ArtifactStagingDirectory)
150158 outputs :
151- - ${{ each artifact_name in parameters.artifact_names }} :
152- - ${{ if or(ne(artifact_name , 'testResults '), parameters.RunTests) }} :
159+ - ${{ each artifact in parameters.artifact_names }} :
160+ - ${{ if or(ne(artifact.testOnly , 'true '), parameters.RunTests) }} :
153161 - output : pipelineArtifact
154- displayName : 📢 Publish ${{ artifact_name }}-Windows
155- targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Windows
156- artifactName : ${{ artifact_name }}-Windows
157- condition : succeededOrFailed()
162+ displayName : 📢 Publish ${{ artifact.name }}-Windows
163+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows
164+ artifactName : ${{ artifact.name }}-Windows
165+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
166+ sbomEnabled : true
167+ - output : pipelineArtifact
168+ displayName : 📢 Publish ${{ artifact.name }}-Windows (for failed attempts)
169+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows
170+ artifactName : ${{ artifact.name }}-Windows-$(System.PhaseAttempt)
171+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
172+ sbomEnabled : true
173+ condition : failed()
158174 - output : pipelineArtifact
159175 displayName : 📢 Publish VSInsertion-Windows
160176 targetPath : $(Build.ArtifactStagingDirectory)/VSInsertion-Windows
@@ -191,7 +207,6 @@ jobs:
191207 - template : microbuild.before.yml
192208 parameters :
193209 EnableLocalization : ${{ parameters.EnableLocalization }}
194- EnableOptProf : ${{ parameters.EnableOptProf }}
195210 IsOptProf : ${{ parameters.IsOptProf }}
196211 ShouldSkipOptimize : ${{ parameters.ShouldSkipOptimize }}
197212 RealSign : ${{ parameters.RealSign }}
@@ -212,7 +227,6 @@ jobs:
212227 - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }} :
213228 - template : microbuild.after.yml
214229 parameters :
215- EnableOptProf : ${{ parameters.EnableOptProf }}
216230 IsOptProf : ${{ parameters.IsOptProf }}
217231 SkipCodesignVerify : ${{ parameters.SkipCodesignVerify }}
218232
@@ -230,13 +244,21 @@ jobs:
230244 signWithProd : true
231245 outputParentDirectory : $(Build.ArtifactStagingDirectory)
232246 outputs :
233- - ${{ each artifact_name in parameters.artifact_names }} :
234- - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }} :
247+ - ${{ each artifact in parameters.artifact_names }} :
248+ - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }} :
249+ - output : pipelineArtifact
250+ displayName : 📢 Publish ${{ artifact.name }}-Linux
251+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
252+ artifactName : ${{ artifact.name }}-Linux
253+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
254+ sbomEnabled : true
235255 - output : pipelineArtifact
236- displayName : 📢 Publish ${{ artifact_name }}-Linux
237- targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Linux
238- artifactName : ${{ artifact_name }}-Linux
239- condition : succeededOrFailed()
256+ displayName : 📢 Publish ${{ artifact.name }}-Linux (for failed attempts)
257+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
258+ artifactName : ${{ artifact.name }}-Linux-$(System.PhaseAttempt)
259+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
260+ sbomEnabled : true
261+ condition : failed()
240262 steps :
241263 - checkout : self
242264 fetchDepth : 0 # avoid shallow clone so nbgv can do its work.
@@ -267,13 +289,21 @@ jobs:
267289 signWithProd : true
268290 outputParentDirectory : $(Build.ArtifactStagingDirectory)
269291 outputs :
270- - ${{ each artifact_name in parameters.artifact_names }} :
271- - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }} :
292+ - ${{ each artifact in parameters.artifact_names }} :
293+ - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }} :
294+ - output : pipelineArtifact
295+ displayName : 📢 Publish ${{ artifact.name }}-macOS
296+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
297+ artifactName : ${{ artifact.name }}-macOS
298+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
299+ sbomEnabled : true
272300 - output : pipelineArtifact
273- displayName : 📢 Publish ${{ artifact_name }}-macOS
274- targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-macOS
275- artifactName : ${{ artifact_name }}-macOS
276- condition : succeededOrFailed()
301+ displayName : 📢 Publish ${{ artifact.name }}-macOS (for failed attempts)
302+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
303+ artifactName : ${{ artifact.name }}-macOS-$(System.PhaseAttempt)
304+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
305+ sbomEnabled : true
306+ condition : failed()
277307 steps :
278308 - checkout : self
279309 fetchDepth : 0 # avoid shallow clone so nbgv can do its work.
0 commit comments