forked from jenkinsci/warnings-ng-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.local
37 lines (31 loc) · 1.34 KB
/
Jenkinsfile.local
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
34
35
36
37
node {
stage ('Checkout') {
checkout scm
}
stage ('Build') {
withMaven(maven: 'mvn-default', mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
sh 'mvn -V -U -e clean verify -DskipTests'
}
recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
}
stage ('Analysis') {
withMaven(maven: 'mvn-default', mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
sh "mvn -V -U -e verify"
}
junit testResults: '**/target/*-reports/TEST-*.xml'
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') {
withMaven(maven: 'mvn-default', mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
sh "mvn -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()
}
}