@@ -101,7 +101,6 @@ jobs:
101101 condition : succeededOrFailed()
102102 dependsOn : ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}
103103 variables :
104- - template : /eng/common/templates/variables/pool-providers.yml
105104 - ${{ if eq(variables['System.TeamProject'], 'internal') }} :
106105 - group : AzureDevOps-Artifact-Feeds-Pats
107106 - ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal'), not(startswith(parameters.vmrBranch, 'internal/release/')), not(eq(variables['Build.Reason'], 'PullRequest'))) }} :
@@ -128,9 +127,36 @@ jobs:
128127 - name : sourcesPath
129128 value : $(vmrPath)
130129
130+ templateContext :
131+ outputs :
132+ - output : pipelineArtifact
133+ displayName : Publish BuildLogs
134+ condition : succeededOrFailed()
135+ targetPath : $(Build.StagingDirectory)/BuildLogs
136+ artifactName : $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
137+
138+ - output : pipelineArtifact
139+ displayName : Publish Artifacts
140+ condition : and(succeededOrFailed(), eq(variables['hasAssets'], 'true'))
141+ targetPath : $(sourcesPath)/artifacts/assets/Release/
142+ artifactName : $(Agent.JobName)_Artifacts
143+
144+ - ${{ if ne(parameters.buildSourceOnly, 'true') }} :
145+ - output : pipelineArtifact
146+ displayName : Publish Packages
147+ targetPath : $(sourcesPath)/artifacts/packages/Release/
148+ artifactName : $(Agent.JobName)_Packages
149+
150+ - ${{ if not(parameters.isBuiltFromVmr) }} :
151+ - output : pipelineArtifact
152+ displayName : Upload failed patches
153+ condition : failed()
154+ targetPath : $(Agent.TempDirectory)
155+ artifactName : $(System.JobDisplayName)_FailedPatches
156+
131157 steps :
132158 - ${{ if not(parameters.isBuiltFromVmr) }} :
133- - template : ../steps/vmr-prepare.yml
159+ - template : ../steps/vmr-prepare.yml@self
134160 parameters :
135161 ${{ if eq(variables['Build.Reason'], 'PullRequest') }} :
136162 vmrBranch : $(System.PullRequest.TargetBranch)
@@ -139,7 +165,7 @@ jobs:
139165
140166 # Synchronize new content in the VMR during PRs (we expect this to come
141167 - ${{ if eq(variables['Build.Reason'], 'PullRequest') }} :
142- - template : ../steps/vmr-pull-updates.yml
168+ - template : ../steps/vmr-pull-updates.yml@self
143169 parameters :
144170 vmrPath : $(vmrPath)
145171 vmrBranch : ${{ parameters.vmrBranch }}
@@ -402,12 +428,6 @@ jobs:
402428 continueOnError: true
403429 condition: succeededOrFailed()
404430
405- - publish : ' $(Build.StagingDirectory)/BuildLogs'
406- artifact : $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
407- displayName : Publish BuildLogs
408- continueOnError : true
409- condition : succeededOrFailed()
410-
411431 # Only upload test results if enabled
412432 - ${{ if eq(parameters.runTests, 'True') }} :
413433 - task : PublishTestResults@2
@@ -421,15 +441,3 @@ jobs:
421441 mergeTestResults : true
422442 publishRunAttachments : true
423443 testRunTitle : SourceBuild_SmokeTests_$(Agent.JobName)
424-
425- - publish : ' $(sourcesPath)/artifacts/assets/Release/'
426- artifact : $(Agent.JobName)_Artifacts
427- displayName : Publish Artifacts
428- condition : and(succeededOrFailed(), eq(variables['hasAssets'], 'true'))
429- continueOnError : true
430-
431- # When building from source, the Private.SourceBuilt.Artifacts archive already contains the nuget packages
432- - ${{ if ne(parameters.buildSourceOnly, 'true') }} :
433- - publish : ' $(sourcesPath)/artifacts/packages/Release/'
434- artifact : $(Agent.JobName)_Packages
435- displayName : Publish Packages
0 commit comments