Skip to content

Commit b8c7141

Browse files
authored
Make integration test logging conditional as well
1 parent 9229324 commit b8c7141

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

azure-pipelines/test.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ steps:
3333
DISPLAY: :99.0
3434
CODE_VERSION: ${{ parameters.testVSCodeVersion }}
3535

36-
- ${{ if contains(parameters.npmCommand, ':integration') }}:
37-
- powershell: |
38-
$tempPath = [System.IO.Path]::GetTempPath()
39-
echo "Temp Path: $tempPath"
40-
Get-ChildItem -Path $tempPath -Filter *.cpuprofile | Copy-Item -Destination "$(Build.SourcesDirectory)/out/logs"
41-
displayName: 'Copy .cpuprofile files to out/logs'
42-
condition: succeededOrFailed()
43-
4436
- task: PublishTestResults@2
4537
condition: succeededOrFailed()
4638
displayName: 'Publish Test Results'
@@ -52,17 +44,25 @@ steps:
5244
mergeTestResults: true
5345
testRunTitle: $(System.StageDisplayName) $(Agent.JobName) (Attempt $(System.JobAttempt))
5446

55-
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
56-
- task: 1ES.PublishPipelineArtifact@1
57-
condition: succeededOrFailed()
58-
displayName: 'Upload integration test logs'
59-
inputs:
60-
path: '$(Build.SourcesDirectory)/out/logs'
61-
artifact: 'Test Logs ($(System.StageDisplayName)-$(Agent.JobName)-$(System.JobAttempt))'
62-
- ${{ else }}:
63-
- task: PublishPipelineArtifact@1
47+
- ${{ if contains(parameters.npmCommand, ':integration') }}:
48+
- powershell: |
49+
$tempPath = [System.IO.Path]::GetTempPath()
50+
echo "Temp Path: $tempPath"
51+
Get-ChildItem -Path $tempPath -Filter *.cpuprofile | Copy-Item -Destination "$(Build.SourcesDirectory)/out/logs"
52+
displayName: 'Copy .cpuprofile files to out/logs'
6453
condition: succeededOrFailed()
65-
displayName: 'Upload integration test logs'
66-
inputs:
67-
targetPath: '$(Build.SourcesDirectory)/out/logs'
68-
artifactName: 'Test Logs ($(System.StageDisplayName)-$(Agent.JobName)-$(System.JobAttempt))'
54+
55+
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
56+
- task: 1ES.PublishPipelineArtifact@1
57+
condition: succeededOrFailed()
58+
displayName: 'Upload integration test logs'
59+
inputs:
60+
path: '$(Build.SourcesDirectory)/out/logs'
61+
artifact: 'Test Logs ($(System.StageDisplayName)-$(Agent.JobName)-$(System.JobAttempt))'
62+
- ${{ else }}:
63+
- task: PublishPipelineArtifact@1
64+
condition: succeededOrFailed()
65+
displayName: 'Upload integration test logs'
66+
inputs:
67+
targetPath: '$(Build.SourcesDirectory)/out/logs'
68+
artifactName: 'Test Logs ($(System.StageDisplayName)-$(Agent.JobName)-$(System.JobAttempt))'

0 commit comments

Comments
 (0)