зеркало из https://github.com/microsoft/msquic.git
Improve Azure Pipelines CI (#130)
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:
Родитель
8160a29ae6
Коммит
3ecb670ab7
|
@ -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
|
Загрузка…
Ссылка в новой задаче