Skip to content

Commit dad454d

Browse files
authored
Update Jenkinsfile
1 parent e7326bf commit dad454d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Jenkinsfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ pipeline{
44
jdk 'myjava'
55
maven 'mymaven'
66
}
7-
agent none
7+
agent {label 'linux_slave'}
88
stages{
99
stage('Checkout'){
10-
agent any
10+
1111
steps{
1212
echo 'cloning..'
1313
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
1414
}
1515
}
1616
stage('Compile'){
17-
agent any
17+
1818
steps{
1919
echo 'compiling..'
2020
sh 'mvn compile'
2121
}
2222
}
2323
stage('CodeReview'){
24-
agent {label 'linux_slave'}
24+
2525
steps{
26-
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
26+
2727
echo 'codeReview'
2828
sh 'mvn pmd:pmd'
2929
}
3030
}
3131
stage('UnitTest'){
32-
agent any
32+
3333
steps{
3434

3535
sh 'mvn test'
@@ -41,7 +41,7 @@ pipeline{
4141
}
4242
}
4343
stage('MetricCheck'){
44-
agent any
44+
4545
steps{
4646
sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml'
4747
}
@@ -52,9 +52,9 @@ pipeline{
5252
}
5353
}
5454
stage('Package'){
55-
agent {label 'linux_slave'}
55+
5656
steps{
57-
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
57+
5858
sh 'mvn package'
5959
}
6060
}

0 commit comments

Comments
 (0)