diff --git a/Jenkinfile b/Jenkinfile new file mode 100644 index 00000000..1a52ed6c --- /dev/null +++ b/Jenkinfile @@ -0,0 +1,31 @@ +pipeline{ + agent{label 'master'} + stages{ + stage('Checkout'){ + steps{ + git branch: 'main', url: 'https://github.com/AnjuMeleth/SpringPetClinic.git' + } + } + stage('Compile'){ + steps{ + sh 'mvn compile' + } + + } + stage('Test'){ + steps{ + sh 'mvn test' + } + } + stage("Packge"){ + steps{ + sh 'mvn package' + } + } + stage ('Depoly'){ + steps{ + sh 'java -jar /var/lib/jenkins/workspace/PetclinicDeclerativePipeline/target/*.jar' + } + } + } +}