Use new coverage recorder.
-node('java11-agent') {
+node('java-agent') {
stage ('Checkout') {
checkout scm
}
@@ -6,6 +6,7 @@ node('java11-agent') {
stage ('Git mining') {
discoverGitReferenceBuild()
mineRepository()
+ gitDiffStat()
}
stage ('Build, Test, and Static Analysis') {
@@ -13,20 +14,18 @@ node('java11-agent') {
sh 'mvn -V -e clean verify -Dmaven.test.failure.ignore -Dgpg.skip'
}
- recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
+ recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java', filters:[excludeFile('.*Assert.java')]
recordIssues tool: errorProne(), healthy: 1, unhealthy: 20
junit testResults: '**/target/*-reports/TEST-*.xml'
- publishCoverage adapters: [jacocoAdapter('**/*/jacoco.xml')],
- sourceFileResolver: sourceFiles('STORE_ALL_BUILD'),
- sourceEncoding: 'UTF-8',
- sourceDirectories: [[path: 'src/main/java']]
+ recordCoverage(tools: [[parser: 'JACOCO', pattern: 'target/site/jacoco/jacoco.xml']], sourceCodeRetention: 'EVERY_BUILD')
+
recordIssues tools: [checkStyle(pattern: 'target/checkstyle-result.xml'),
spotBugs(pattern: 'target/spotbugsXml.xml'),
pmdParser(pattern: 'target/pmd.xml'),
cpd(pattern: 'target/cpd.xml'),
- taskScanner(highTags:'FIXME', normalTags:'TODO', includePattern: '**/*.java', excludePattern: 'target/**/*')],
- qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
+ revApi(pattern: 'target/revapi-result.json'),
+ taskScanner(highTags:'FIXME', normalTags:'TODO', includePattern: '**/*.java', excludePattern: 'target/**/*')]
}
stage ('Collect Maven Warnings') {
