Skip to content

Commit 19f9c03

Browse files
authored
Create Pipelinecode_SLAVES
1 parent 2984be6 commit 19f9c03

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

JENKINS/Pipelinecode_SLAVES

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
pipeline{
2+
3+
tools{
4+
jdk 'myjava'
5+
maven 'mymaven'
6+
}
7+
agent none
8+
stages{
9+
stage('clone repo'){
10+
agent any
11+
steps{
12+
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
13+
}
14+
}
15+
stage('Compile'){
16+
agent {label 'Linux_Slave'}
17+
steps{
18+
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
19+
sh 'mvn compile'
20+
}
21+
}
22+
stage('CodeReview'){
23+
agent {label 'Linux_Slave'}
24+
steps{
25+
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
26+
sh 'mvn pmd:pmd'
27+
}
28+
}
29+
stage('Unit Test'){
30+
agent {label 'win_slave'}
31+
steps{
32+
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
33+
bat 'mvn test'
34+
}
35+
}
36+
stage('CodeCoverage'){
37+
agent {label 'win_slave'}
38+
steps{
39+
40+
bat 'mvn cobertura:cobertura -Dcobertura.format=xml'
41+
}
42+
}
43+
stage('Packge'){
44+
agent {label 'Linux_Slave'}
45+
steps{
46+
47+
sh 'mvn package'
48+
}
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)