@@ -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 }}
@@ -211,7 +226,6 @@ jobs:
211226 - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }} :
212227 - template : microbuild.after.yml
213228 parameters :
214- EnableOptProf : ${{ parameters.EnableOptProf }}
215229 IsOptProf : ${{ parameters.IsOptProf }}
216230 SkipCodesignVerify : ${{ parameters.SkipCodesignVerify }}
217231
@@ -229,13 +243,21 @@ jobs:
229243 signWithProd : true
230244 outputParentDirectory : $(Build.ArtifactStagingDirectory)
231245 outputs :
232- - ${{ each artifact_name in parameters.artifact_names }} :
233- - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }} :
246+ - ${{ each artifact in parameters.artifact_names }} :
247+ - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }} :
248+ - output : pipelineArtifact
249+ displayName : 📢 Publish ${{ artifact.name }}-Linux
250+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
251+ artifactName : ${{ artifact.name }}-Linux
252+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
253+ sbomEnabled : true
234254 - output : pipelineArtifact
235- displayName : 📢 Publish ${{ artifact_name }}-Linux
236- targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Linux
237- artifactName : ${{ artifact_name }}-Linux
238- condition : succeededOrFailed()
255+ displayName : 📢 Publish ${{ artifact.name }}-Linux (for failed attempts)
256+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
257+ artifactName : ${{ artifact.name }}-Linux-$(System.PhaseAttempt)
258+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
259+ sbomEnabled : true
260+ condition : failed()
239261 steps :
240262 - checkout : self
241263 fetchDepth : 0 # avoid shallow clone so nbgv can do its work.
@@ -265,13 +287,21 @@ jobs:
265287 signWithProd : true
266288 outputParentDirectory : $(Build.ArtifactStagingDirectory)
267289 outputs :
268- - ${{ each artifact_name in parameters.artifact_names }} :
269- - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }} :
290+ - ${{ each artifact in parameters.artifact_names }} :
291+ - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }} :
292+ - output : pipelineArtifact
293+ displayName : 📢 Publish ${{ artifact.name }}-macOS
294+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
295+ artifactName : ${{ artifact.name }}-macOS
296+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
297+ sbomEnabled : true
270298 - output : pipelineArtifact
271- displayName : 📢 Publish ${{ artifact_name }}-macOS
272- targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-macOS
273- artifactName : ${{ artifact_name }}-macOS
274- condition : succeededOrFailed()
299+ displayName : 📢 Publish ${{ artifact.name }}-macOS (for failed attempts)
300+ targetPath : $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
301+ artifactName : ${{ artifact.name }}-macOS-$(System.PhaseAttempt)
302+ ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }} :
303+ sbomEnabled : true
304+ condition : failed()
275305 steps :
276306 - checkout : self
277307 fetchDepth : 0 # avoid shallow clone so nbgv can do its work.
0 commit comments