Skip to content

Commit d1fc5b0

Browse files
authored
Update Jenkinsfile
1 parent 5527629 commit d1fc5b0

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

Jenkinsfile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
pipeline {
22
agent any
3-
4-
tools{
5-
maven 'Maven3.6'
6-
}
7-
83
stages {
94
stage('compile') {
105
steps {
116
echo 'compiling..'
12-
git url: 'https://github.com/sammana9/samplejavaapp'
13-
sh 'mvn compile'
7+
git url: 'https://github.com/sammana9/DevOpsClassCodes'
8+
sh script: '/opt/apache-maven-3.6.3/bin/mvn compile'
149
}
1510
}
1611
stage('codereview-pmd') {
1712
steps {
1813
echo 'codereview..'
19-
sh 'mvn -P metrics pmd:pmd'
14+
sh script: '/opt/apache-maven-3.6.3/bin/mvn -P metrics pmd:pmd'
2015
}
2116
post {
2217
success {
@@ -27,7 +22,7 @@ pipeline {
2722
stage('unit-test') {
2823
steps {
2924
echo 'unittest..'
30-
sh 'mvn test'
25+
sh script: '/opt/apache-maven-3.6.3/bin/mvn test'
3126
}
3227
post {
3328
success {
@@ -38,7 +33,7 @@ pipeline {
3833
stage('codecoverate') {
3934
steps {
4035
echo 'codecoverage..'
41-
sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml'
36+
sh script: '/opt/apache-maven-3.6.3/bin/mvn cobertura:cobertura -Dcobertura.report.format=xml'
4237
}
4338
post {
4439
success {
@@ -49,7 +44,7 @@ pipeline {
4944
stage('package') {
5045
steps {
5146
echo 'package..'
52-
sh 'mvn package'
47+
sh script: '/opt/apache-maven-3.6.3/bin/mvn package'
5348
}
5449
}
5550
}

0 commit comments

Comments
 (0)