Skip to content

Commit 5d596bd

Browse files
authored
Fix official build break (dotnet#7639)
Regressed with dotnet#7610. The CopyFiles, PublishPipelineArtifact and PublishTestResults steps should only be executed when running in the public team project as internal builds don't run tests. This change just mimics the condition that was already on the "Run Tests" powershell step.
1 parent 2ee6f07 commit 5d596bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

eng/pipeline.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ jobs:
224224
TargetFolder: '$(System.DefaultWorkingDirectory)\Results\'
225225
CleanTargetFolder: true
226226
OverWrite: true
227-
condition: and(eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release'))
227+
condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release'))
228228

229229
- task: CopyFiles@2
230230
inputs:
@@ -233,23 +233,24 @@ jobs:
233233
TargetFolder: '$(System.DefaultWorkingDirectory)\ResultsX86\'
234234
CleanTargetFolder: true
235235
OverWrite: true
236-
condition: and(eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release'))
236+
condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release'))
237237

238238
- task: PublishPipelineArtifact@1
239239
inputs:
240240
artifactName: 'TestResultsX64'
241241
targetPath: '$(System.DefaultWorkingDirectory)\Results\'
242-
condition: and(eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release'))
242+
condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release'))
243243

244244
- task: PublishPipelineArtifact@1
245245
inputs:
246246
artifactName: 'TestResultsX86'
247247
targetPath: '$(System.DefaultWorkingDirectory)\ResultsX86\'
248-
condition: and(eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release'))
248+
condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release'))
249249

250250
- task: PublishTestResults@2
251251
inputs:
252252
testResultsFormat: 'XUnit'
253253
testResultsFiles: 'testResults.xml'
254254
searchFolder: '$(System.DefaultWorkingDirectory)\Results\'
255-
testRunTitle: 'CTP results'
255+
testRunTitle: 'CTP results'
256+
condition: eq(variables['System.TeamProject'], 'public')

0 commit comments

Comments
 (0)