forked from jenkinsci/warnings-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.local
45 lines (30 loc) · 1.62 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
38
39
40
41
42
43
44
node {
stage ('Checkout') {
checkout scm
}
stage ('Build') {
def mvnHome = tool 'mvn-default'
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e clean verify -Dsurefire.useFile=false"
junit testResults: '**/target/*-reports/TEST-*.xml'
def java = scanForIssues tool: [$class: 'Java']
def javadoc = scanForIssues tool: [$class: 'JavaDoc']
publishIssues issues:[java, javadoc], filters: [includePackage('io.jenkins.plugins.analysis.*')]
}
stage ('Analysis') {
def mvnHome = tool 'mvn-default'
sh "${mvnHome}/bin/mvn -batch-mode -V -U -e checkstyle:checkstyle pmd:pmd pmd:cpd findbugs:findbugs spotbugs:spotbugs"
def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: '**/target/checkstyle-result.xml'
publishIssues issues:[checkstyle]
def pmd = scanForIssues tool: [$class: 'Pmd'], pattern: '**/target/pmd.xml'
publishIssues issues:[pmd]
def cpd = scanForIssues tool: [$class: 'Cpd'], pattern: '**/target/cpd.xml'
publishIssues issues:[cpd]
def findbugs = scanForIssues tool: [$class: 'FindBugs'], pattern: '**/target/findbugsXml.xml'
publishIssues issues:[findbugs]
def spotbugs = scanForIssues tool: [$class: 'SpotBugs'], pattern: '**/target/spotbugsXml.xml'
publishIssues issues:[spotbugs]
def maven = scanForIssues tool: [$class: 'MavenConsole']
publishIssues issues:[maven]
publishIssues id:'analysis', name:'White Mountains', issues:[checkstyle, pmd, findbugs, spotbugs], filters: [includePackage('io.jenkins.plugins.analysis.*')]
}
}