在管道中,我有两个不同的步骤。第一个生成一些文件,第二个应该将这些文件作为输入。
该管道的Yaml如下:
name: myscript
stages:
- stage: Tes/t
displayName: owasp-test
jobs:
- job: owasp_test
displayName: run beasic checks for site
pool:
name: default
demands: Agent.OS -equals Windows_NT
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/*.sln'
- task: dependency-check-build-task@5
inputs:
projectName: 'DependencyCheck'
scanPath: '**/*.dll'
format: 'JUNIT'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/*-junit.xml'
这个
dependency-check-build-task
返回XML文件:
File upload succeed.
Upload 'P:\Azure-Pipelines-Agent\_work\2\TestResults\dependency-check\dependency-check-junit.xml' to file container: '#/11589616/dependency-check'
Associated artifact 53031 with build 21497
以下步骤(
PublishTestResults
)应该拿走那份文件但是回来了
##[warning]No test result files matching **/*-junit.xml were found.
相反。在管道运行之后,我可以在工件中看到该文件。