forked from jenkinsci/analysis-model
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile.local
More file actions
33 lines (26 loc) · 1.06 KB
/
Jenkinsfile.local
File metadata and controls
33 lines (26 loc) · 1.06 KB
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
32
33
node {
def mvnHome = tool 'mvn-default'
stage ('Checkout') {
checkout scm
}
stage ('Build') {
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e clean verify -DskipTests"
recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
recordIssues tool: errorProne()
}
stage ('Analysis') {
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e verify"
recordIssues tools: [checkStyle(),
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 ('Coverage') {
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e jacoco:prepare-agent test jacoco:report -Djenkins.test.timeout=240"
publishCoverage adapters: [jacocoAdapter('target/site/jacoco/jacoco.xml')]
}
stage ('Collect Maven Warnings') {
recordIssues tool: mavenConsole()
}
}