Skip to content

Commit 1ef77b6

Browse files
authored
Create Jenkinsfile
Create Jenkinsfile pipline
1 parent 03969de commit 1ef77b6

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Jenkinsfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
pipeline{
2+
tools{
3+
jdk 'myjava'
4+
maven 'mymaven'
5+
}
6+
agent any
7+
8+
stages{
9+
stage('Checkout SCM')
10+
{
11+
steps{
12+
echo 'Cloning...'
13+
git 'https://github.com/mrtienvu/JavaWebCalculator.git'
14+
15+
}
16+
}
17+
stage('Compile')
18+
{
19+
steps{
20+
echo 'Compiling...'
21+
sh 'mvn compile'
22+
}
23+
}
24+
stage('CodeReview')
25+
{
26+
steps{
27+
echo 'Reviewing...'
28+
sh 'mvn pmd:pmd'
29+
}
30+
}
31+
32+
stage('UnitTesting')
33+
{
34+
steps{
35+
echo 'Testing...'
36+
sh 'mvn test'
37+
}
38+
}
39+
stage('Metric Check')
40+
{
41+
steps{
42+
echo 'Metric checking...'
43+
sh 'mvn cobertura:cobertura -Dcoberture.report.format=xml'
44+
}
45+
}
46+
stage('Package')
47+
{
48+
steps{
49+
echo 'Packaging...'
50+
sh 'mvn package'
51+
}
52+
}
53+
54+
}
55+
}

0 commit comments

Comments
 (0)