forked from AnjuMeleth/SpringPetClinic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
32 lines (31 loc) · 795 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pipeline{
agent{label 'master'}
tools{maven 'M3'}
stages{
stage('Checkpout'){
steps{
git branch: 'main', url: 'https://github.com/ilidio-lopes/SpringPetClinic.git'
}
}
stage('Build'){
steps{
sh 'mvn compile'
}
}
stage('Test'){
steps{
sh 'mvn test'
}
}
stage('Package'){
steps{
sh 'mvn package'
}
}
stage('Deploy'){
steps{
sh 'java -jar /var/lib/jenkins/workspace/PetClinicDeclarativePipeline/target/*.jar'
}
}
}
}