我有一个简单的 Jenkins 管道来构建 docker 容器,例如:
docker run --rm -i --volume /PR.Tests/TEST:/tests --name=rp1 rp-tests
它将生成一个包含测试结果的新文件
输出:
Microsoft (R) Test Execution Command Line Tool Version 16.8.3
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Results File: /tests/test-results.trx
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 2 ms - /app/PR.Tests.dll (net5.0)
然后在管道中我有:
step([$class: 'MSTestPublisher', testResultsFile:'**/*.trx', failOnError: true, keepLongStdio: true])
它返回以下错误:
java.nio.file.FileSystemException: /var/lib/jenkins/workspace/cloud-pr_feature_CLOUD-558/PR.Tests/TestResults/test-results.trx: Operation not permitted