File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ pipeline {
2+ agent any
3+ stages {
4+ stage(' compile' ) {
5+ steps {
6+ echo ' compiling..'
7+ git url : ' https://github.com/lerndevops/samplejavaapp'
8+ sh script : ' /opt/maven/bin/mvn compile'
9+ }
10+ }
11+ stage(' codereview-pmd' ) {
12+ steps {
13+ echo ' codereview..'
14+ sh script : ' /opt/maven/bin/mvn -P metrics pmd:pmd'
15+ }
16+ post {
17+ success {
18+ recordIssues enabledForFailure : true , tool : pmdParser(pattern : ' **/target/pmd.xml' )
19+ }
20+ }
21+ }
22+ stage(' unit-test' ) {
23+ steps {
24+ echo ' unittest..'
25+ sh script : ' /opt/maven/bin/mvn test'
26+ }
27+ post {
28+ success {
29+ junit ' target/surefire-reports/*.xml'
30+ }
31+ }
32+ }
33+ stage(' package' ) {
34+ steps {
35+ echo ' package......'
36+ sh script : ' /opt/maven/bin/mvn package'
37+ }
38+ }
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments