This PR updates the YAML files to do a couple of things:

1. Mimic 'drop' artifact structure in 'logs' so it's clear what 'drop' was being tested.
2. Only upload 'logs' if the test results indicate a failure.
This commit is contained in:
Nick Banks 2020-02-12 12:26:13 -08:00 коммит произвёл GitHub
Родитель 8160a29ae6
Коммит 3ecb670ab7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 43 добавлений и 41 удалений

Просмотреть файл

@ -39,23 +39,9 @@ jobs:
filePath: test.ps1
arguments: -Batch -LogProfile Basic.Light -ConvertLogs -GenerateXmlResults -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls ${{ parameters.tls }} ${{ parameters.extraArgs }}
- task: CopyFiles@2
displayName: Stage Artifacts
inputs:
sourceFolder: artifacts/logs
contents: '**/!(*-results.xml)'
targetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.platform }}/${{ parameters.arch }}/${{ parameters.tls }}
- task: PublishBuildArtifacts@1
displayName: Publish Test Output
inputs:
artifactName: logs
pathToPublish: $(Build.ArtifactStagingDirectory)
parallel: true
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/*-results.xml'
failTaskOnFailedTests: true
- template: ./upload-test-artifacts.yml
parameters:
platform: ${{ parameters.platform }}
config: ${{ parameters.config }}
arch: ${{ parameters.arch }}
tls: ${{ parameters.tls }}

Просмотреть файл

@ -1,4 +1,4 @@
# This template contains steps to run spin quic for a single configuration.
# This template contains steps to run spinquic for a single configuration.
parameters:
image: ''
@ -38,23 +38,9 @@ jobs:
filePath: spin.ps1
arguments: -GenerateXmlResults -Timeout 300000 -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls ${{ parameters.tls }}
- task: CopyFiles@2
displayName: Stage Artifacts
inputs:
sourceFolder: artifacts/logs
contents: '**/!(*-results.xml)'
targetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.platform }}/${{ parameters.arch }}/${{ parameters.tls }}
- task: PublishBuildArtifacts@1
displayName: Publish Test Output
inputs:
artifactName: logs
pathToPublish: $(Build.ArtifactStagingDirectory)
parallel: true
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/*-results.xml'
failTaskOnFailedTests: true
- template: ./upload-test-artifacts.yml
parameters:
platform: ${{ parameters.platform }}
config: ${{ parameters.config }}
arch: ${{ parameters.arch }}
tls: ${{ parameters.tls }}

Просмотреть файл

@ -0,0 +1,30 @@
# Uploads the test artifacts for a single build configuration.
parameters:
platform: ''
config: ''
arch: ''
tls: ''
steps:
- task: CopyFiles@2
displayName: Stage Artifacts
inputs:
sourceFolder: artifacts/logs
contents: '**/!(*-results.xml)'
targetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.platform }}/${{ parameters.arch }}_${{ parameters.config }}_${{ parameters.tls }}
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/*-results.xml'
failTaskOnFailedTests: true
- task: PublishBuildArtifacts@1
displayName: Publish Test Output
condition: failed()
inputs:
artifactName: logs
pathToPublish: $(Build.ArtifactStagingDirectory)
parallel: true