Commit 643733c3 authored by 裴剑(Jian Pei)'s avatar 裴剑(Jian Pei)
Browse files

improve Jenkinsfile

parent 57e349ec
1 merge request!1ADC Model Training Data Rule Configuration
Showing with 22 additions and 1 deletion
+22 -1
......@@ -19,10 +19,31 @@ pipeline {
targetLocation: 'settings.xml',
variable: 'MyGlobalSettings')]) {
script{
sh "mvn clean package -P${profiles}"
try{
sh "mvn -s $MyGlobalSettings clean package -P$profiles"
}catch(Exception e){
currentBuild.result="FAILURE"
}
stash includes: 'target/surefire-reports/*.xml', name: 'TestResult'
}
}
}
}
stage('Record Test Result') {
steps {
script{
sh 'rm -rf target/surefire-reports'
unstash 'TestResult'
junit testResults: 'target/surefire-reports/*.xml'
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'target/surefire-reports']]
])
}
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment