@@ -10,22 +10,18 @@ pipeline {
1010 stage (' Build: Plain Maven (M2)' ) {
1111 steps {
1212 // ignore test failures since we parse the test results afterwards
13- sh ' mvn clean verify -Pm2 -B -Dmaven.test.failure.ignore=true'
13+ timeout(30 ) {
14+ sh ' mvn clean verify -Pm2 -B -Dmaven.test.failure.ignore=true'
15+ }
1416 }
1517 }
1618
1719 stage (' Build: Eclipse-based (P2)' ) {
1820 steps {
1921 // ignore test failures since we parse the test results afterwards
20- sh ' mvn clean verify -Pp2 -B -Dmaven.test.failure.ignore=true'
21- }
22- }
23-
24- stage (' Generate: Reports' ) {
25- steps {
26- junit ' **/surefire-reports/*.xml'
27- recordIssues failOnError : true , qualityGates : [[threshold : 1 , type : ' TOTAL' , unstable : true ]],
28- tools : [checkStyle(pattern : ' **/target/checkstyle-result.xml' , reportEncoding : ' UTF-8' )]
22+ timeout(30 ) {
23+ sh ' mvn clean verify -Pp2 -B -Dmaven.test.failure.ignore=true'
24+ }
2925 }
3026 }
3127
@@ -43,4 +39,21 @@ pipeline {
4339 }
4440 }
4541 }
42+
43+ post {
44+ always {
45+ // Record & publish checkstyle issues
46+ recordIssues enabledForFailure : true , publishAllIssues : true ,
47+ tool : checkStyle(reportEncoding : ' UTF-8' ),
48+ qualityGates : [[threshold : 1 , type : ' TOTAL' , unstable : true ]]
49+
50+ // Record & publish test results
51+ withChecks(' Tests' ) {
52+ junit ' tests/**/surefire-reports/*.xml'
53+ }
54+
55+ // Record maven,java warnings
56+ recordIssues enabledForFailure : true , skipPublishingChecks :true , tools : [mavenConsole(), java()]
57+ }
58+ }
4659}
0 commit comments