forked from XiongKezhi/codingstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
31 lines (25 loc) · 1.22 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
node {
stage ('Checkout') {
checkout scm
}
stage ('Build, Test, and Static Analysis') {
sh 'mvn -B -V -e clean verify -Dmaven.test.failure.ignore -Dgpg.skip'
recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
recordIssues tool: errorProne(), healthy: 1, unhealthy: 20
junit '**/target/*-reports/TEST-*.xml'
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/**/*')],
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
}
stage ('Mutation Coverage') {
sh "mvn org.pitest:pitest-maven:mutationCoverage"
step([$class: 'PitPublisher', mutationStatsFile: 'target/pit-reports/**/mutations.xml'])
}
stage ('Collect Maven Warnings') {
recordIssues tool: mavenConsole()
}
}