From 55743428117122a946ab8c913091e1359b3c8888 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Thu, 14 Nov 2024 03:07:16 +0000 Subject: [PATCH] Added test and coverage results --- Jenkinsfile | 3 +++ pom.xml | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1c4ffdc..b42ab4e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,11 +15,14 @@ pipeline { stage("test") { steps { sh "mvn test" + xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'target/surefire-reports/TEST-*.xml', stopProcessingIfError: true)] + recordCoverage(tools: [[parser: 'JUNIT', pattern: 'target/surefire-reports/TEST-*.xml']]) } } stage("deploy") { steps { sh "mvn package" + archiveArtifacts artifacts: 'target/*.jar', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } } diff --git a/pom.xml b/pom.xml index 140d40d..a0e2db4 100644 --- a/pom.xml +++ b/pom.xml @@ -54,5 +54,13 @@ test - + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.2 + + + \ No newline at end of file