From fefc1c53b002dbed1bf8f9a699bb16780c9ba2e9 Mon Sep 17 00:00:00 2001 From: Aseerwadham Date: Thu, 16 Mar 2023 13:18:16 +0530 Subject: [PATCH] Added changes in Jenkinsfile --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ pom.xml | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e69de29bb..e5dbe770f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -0,0 +1,28 @@ +pipeline { + agent { label 'JDK_17' } + triggers { pollSCM ('* * * * *') } + } + stages { + stage('vcs') { + steps { + git url: 'https://github.com/Aseerwadham/spring-petclinic.git', + branch: 'main' + } + } + stage('package') { + tools { + jdk 'JDK_17' + } + steps { + sh "mvn package" + } + } + stage('post build') { + steps { + archiveArtifacts artifacts: '**/target/spring-petclinic-3.0.0-SNAPSHOT.jar', + onlyIfSuccessful: true + junit testResults: '**/surefire-reports/TEST-*.xml' + } + } + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 67d56ca12..c57832b43 100644 --- a/pom.xml +++ b/pom.xml @@ -382,5 +382,5 @@ - +