Enable coverage.
-node {
+node('java11-agent') {
stage ('Checkout') {
checkout scm
}
- stage ('Build and Analysis') {
- withMaven(maven: 'mvn-default', mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
- sh 'mvn -ntp -V -e clean verify -f plugin/pom.xml -Dmaven.test.failure.ignore -DskipITs'
+ stage ('Git mining') {
+ discoverGitReferenceBuild()
+ mineRepository()
+ gitDiffStat()
}
- gitDiffStat()
- mineRepository()
- recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
- recordIssues tool: errorProne()
+ stage ('Build, Test, and Static Analysis') {
+ withMaven(mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
+ sh 'mvn -V -e clean verify -Dmaven.test.failure.ignore -Dgpg.skip'
+ }
+
+ 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'
- recordIssues tools: [mavenConsole(),
- 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/**/*,**/TaskScannerTest.java')]
+ publishCoverage adapters: [jacocoAdapter('**/*/jacoco.xml')], sourceFileResolver: sourceFiles('STORE_ALL_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/**/*')]
+ }
+
+ stage ('Collect Maven Warnings') {
+ recordIssues tool: mavenConsole()
}
}
