@@ -163,28 +163,57 @@ jobs:
163163 testResultsFiles : ' artifacts/logs/**/*.trx'
164164 mergeTestResults : true
165165 - ${{ if and(eq(parameters.artifacts.publish, 'true'), eq(variables['system.pullrequest.isfork'], false)) }} :
166- - task : 1ES.PublishPipelineArtifact@1
167- displayName : Upload artifacts
168- continueOnError : true
169- inputs :
170- ${{ if eq(parameters.buildDirectory, '') }} :
171- path : ${{ parameters.artifacts.path }}
172- ${{ if ne(parameters.buildDirectory, '') }} :
173- path : ${{ parameters.buildDirectory }}\${{ parameters.artifacts.path }}
174- ${{ if eq(parameters.artifacts.name, '') }} :
175- artifactName : artifacts-$(AgentOsName)-$(BuildConfiguration)
176- ${{ if ne(parameters.artifacts.name, '') }} :
177- artifactName : ${{ parameters.artifacts.name }}
166+ - ${{ if eq(variables['System.TeamProject'], 'internal') }} :
167+ - task : 1ES.PublishPipelineArtifact@1
168+ displayName : Upload artifacts
169+ continueOnError : true
170+ inputs :
171+ ${{ if eq(parameters.buildDirectory, '') }} :
172+ path : ${{ parameters.artifacts.path }}
173+ ${{ if ne(parameters.buildDirectory, '') }} :
174+ path : ${{ parameters.buildDirectory }}\${{ parameters.artifacts.path }}
175+ ${{ if eq(parameters.artifacts.name, '') }} :
176+ artifactName : artifacts-$(AgentOsName)-$(BuildConfiguration)
177+ ${{ if ne(parameters.artifacts.name, '') }} :
178+ artifactName : ${{ parameters.artifacts.name }}
179+ - ${{ else }} :
180+ - task : PublishBuildArtifacts@1
181+ displayName : Upload artifacts
182+ continueOnError : true
183+ inputs :
184+ ${{ if eq(parameters.buildDirectory, '') }} :
185+ pathToPublish : ${{ parameters.artifacts.path }}
186+ ${{ if ne(parameters.buildDirectory, '') }} :
187+ pathToPublish : ${{ parameters.buildDirectory }}\${{ parameters.artifacts.path }}
188+ ${{ if eq(parameters.artifacts.name, '') }} :
189+ artifactName : artifacts-$(AgentOsName)-$(BuildConfiguration)
190+ ${{ if ne(parameters.artifacts.name, '') }} :
191+ artifactName : ${{ parameters.artifacts.name }}
192+ artifactType : Container
193+ parallel : true
178194 - ${{ if and(eq(parameters.artifacts.publish, 'true'), ne(variables['system.pullrequest.isfork'], false)) }} :
179- - task : 1ES.PublishPipelineArtifact@1
180- displayName : Upload logs
181- continueOnError : true
182- inputs :
183- ${{ if eq(parameters.buildDirectory, '') }} :
184- path : artifacts/logs/
185- ${{ if ne(parameters.buildDirectory, '') }} :
186- path : ${{ parameters.buildDirectory }}/artifacts/logs
187- artifactName : logs-$(AgentOsName)-$(BuildConfiguration)
195+ - ${{ if eq(variables['System.TeamProject'], 'internal') }} :
196+ - task : 1ES.PublishPipelineArtifact@1
197+ displayName : Upload logs
198+ continueOnError : true
199+ inputs :
200+ ${{ if eq(parameters.buildDirectory, '') }} :
201+ path : artifacts/logs/
202+ ${{ if ne(parameters.buildDirectory, '') }} :
203+ path : ${{ parameters.buildDirectory }}/artifacts/logs
204+ artifactName : logs-$(AgentOsName)-$(BuildConfiguration)
205+ - ${{ else }} :
206+ - task : PublishBuildArtifacts@1
207+ displayName : Upload logs
208+ continueOnError : true
209+ inputs :
210+ ${{ if eq(parameters.buildDirectory, '') }} :
211+ pathToPublish : artifacts/logs/
212+ ${{ if ne(parameters.buildDirectory, '') }} :
213+ pathToPublish : ${{ parameters.buildDirectory }}/artifacts/logs
214+ artifactName : logs-$(AgentOsName)-$(BuildConfiguration)
215+ artifactType : Container
216+ parallel : true
188217 - ${{ parameters.afterBuild }}
189218 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }} :
190219 - task : MicroBuildCleanup@1
0 commit comments