build file
Some checks failed
test/timeline-server/pipeline/head There was a failure building this commit
Some checks failed
test/timeline-server/pipeline/head There was a failure building this commit
This commit is contained in:
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@@ -53,7 +53,16 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit testResults: 'target/surefire-reports/*.xml'
|
||||
script {
|
||||
// 检查测试报告文件是否存在
|
||||
def reportFiles = findFiles(glob: 'target/surefire-reports/TEST-*.xml')
|
||||
if (reportFiles.length > 0) {
|
||||
echo "找到 ${reportFiles.length} 个测试报告文件"
|
||||
junit testResults: 'target/surefire-reports/TEST-*.xml'
|
||||
} else {
|
||||
echo "未找到测试报告文件,跳过JUnit发布"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user