GeezerVison is showing github.com — Update Jenkinsfile · sammana9/samplejavaapp@2939a11
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Jenkinsfile +10-5Lines changed: 10 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | pipeline { |
2 | 2 | agent any |
| 3 | + |
| 4 | + tools{ |
| 5 | + maven 'Maven3.6' |
| 6 | + } |
| 7 | + |
3 | 8 | stages { |
4 | 9 | stage('compile') { |
5 | 10 | steps { |
6 | 11 | echo 'compiling..' |
7 | 12 | git url: 'https://github.com/sammana9/DevOpsClassCodes' |
8 | | - sh script: '/opt/apache-maven-3.6.3/bin/mvn compile' |
| 13 | + sh 'mvn compile' |
9 | 14 | } |
10 | 15 | } |
11 | 16 | stage('codereview-pmd') { |
12 | 17 | steps { |
13 | 18 | echo 'codereview..' |
14 | | - sh script: '/opt/apache-maven-3.6.3/bin/mvn -P metrics pmd:pmd' |
| 19 | + sh 'mvn -P metrics pmd:pmd' |
15 | 20 | } |
16 | 21 | post { |
17 | 22 | success { |
@@ -22,7 +27,7 @@ pipeline { |
22 | 27 | stage('unit-test') { |
23 | 28 | steps { |
24 | 29 | echo 'unittest..' |
25 | | - sh script: '/opt/apache-maven-3.6.3/bin/mvn test' |
| 30 | + sh 'mvn test' |
26 | 31 | } |
27 | 32 | post { |
28 | 33 | success { |
@@ -33,7 +38,7 @@ pipeline { |
33 | 38 | stage('codecoverate') { |
34 | 39 | steps { |
35 | 40 | echo 'codecoverage..' |
36 | | - sh script: '/opt/apache-maven-3.6.3/bin/mvn cobertura:cobertura -Dcobertura.report.format=xml' |
| 41 | + sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml' |
37 | 42 | } |
38 | 43 | post { |
39 | 44 | success { |
@@ -44,7 +49,7 @@ pipeline { |
44 | 49 | stage('package') { |
45 | 50 | steps { |
46 | 51 | echo 'package..' |
47 | | - sh script: '/opt/apache-maven-3.6.3/bin/mvn package' |
| 52 | + sh 'mvn package' |
48 | 53 | } |
49 | 54 | } |
50 | 55 | } |
|