-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Jenkinsfile
40 lines (40 loc) · 1.05 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
32
33
34
35
36
37
38
39
40
pipeline {
agent any
stages {
stage('compile') {
steps {
echo 'compiling..'
git url: 'https://github.com/lerndevops/samplejavaapp'
sh script: '/opt/maven/bin/mvn compile'
}
}
stage('codereview-pmd') {
steps {
echo 'codereview..'
sh script: '/opt/maven/bin/mvn -P metrics pmd:pmd'
}
post {
success {
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml')
}
}
}
stage('unit-test') {
steps {
echo 'unittest..'
sh script: '/opt/maven/bin/mvn test'
}
post {
success {
junit 'target/surefire-reports/*.xml'
}
}
}
stage('package') {
steps {
echo 'package......'
sh script: '/opt/maven/bin/mvn package'
}
}
}
}