HADOOP-17904. Test Result Not Working In Jenkins Result. (#3413). Contributed by Ayush Saxena.

This commit is contained in:
Ayush Saxena 2021-09-11 05:15:54 +05:30 committed by GitHub
parent 90bc688c78
commit 4d18a2eb99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -30,8 +30,10 @@ def publishJUnitResults() {
boolean surefireReportsExist = findCmdExitCode == 0
if (surefireReportsExist) {
echo "XML files found under surefire-reports, running junit"
// The path should be relative to WORKSPACE for the junit.
SRC = "${SOURCEDIR}/**/target/surefire-reports/*.xml".replace("$WORKSPACE/","")
try {
junit "${SOURCEDIR}/**/target/surefire-reports/*.xml"
junit "${SRC}"
} catch(e) {
echo 'junit processing: ' + e.toString()
}