GeezerVison is showing github.com — Update Jenkinsfile · raza08/samplejavaapp@15a18bb
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 +3-25Lines changed: 3 additions & 25 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,46 +5,24 @@ pipeline { |
5 | 5 | steps { |
6 | 6 | echo 'compiling..' |
7 | 7 | git url: 'https://github.com/lerndevops/DevOpsClassCodes' |
8 | | - sh script: '/opt/apache-maven-3.8.1/bin/mvn compile' |
| 8 | + sh script: 'mvn compile' |
9 | 9 | } |
10 | 10 | } |
11 | | - stage('codereview-pmd') { |
12 | | - steps { |
13 | | - echo 'codereview..' |
14 | | - sh script: '/opt/apache-maven-3.8.1/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 | 11 | stage('unit-test') { |
23 | 12 | steps { |
24 | 13 | echo 'unittest..' |
25 | | - sh script: '/opt/apache-maven-3.8.1/bin/mvn test' |
| 14 | + sh script: 'mvn test' |
26 | 15 | } |
27 | 16 | post { |
28 | 17 | success { |
29 | 18 | junit 'target/surefire-reports/*.xml' |
30 | 19 | } |
31 | 20 | } |
32 | 21 | } |
33 | | - stage('codecoverate') { |
34 | | - steps { |
35 | | - echo 'codecoverage..' |
36 | | - sh script: '/opt/apache-maven-3.8.1/bin/mvn cobertura:cobertura -Dcobertura.report.format=xml' |
37 | | - } |
38 | | - post { |
39 | | - success { |
40 | | - cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'target/site/cobertura/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false |
41 | | - } |
42 | | - } |
43 | | - } |
44 | 22 | stage('package') { |
45 | 23 | steps { |
46 | 24 | echo 'package......' |
47 | | - sh script: '/opt/apache-maven-3.8.1/bin/mvn package' |
| 25 | + sh script: 'mvn package' |
48 | 26 | } |
49 | 27 | } |
50 | 28 | } |
|