From 3c3a813bc4c66337e25b2eb219641d539b246ef6 Mon Sep 17 00:00:00 2001 From: Naresh Date: Tue, 14 Mar 2023 04:40:56 -0400 Subject: [PATCH] new one --- jenkinsfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..0d6c70125 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,22 @@ +pipeline { + agent { label 'maven' } + stages { + stage('vcs') { + steps { + git url: 'https://github.com/naresh010203/spring-petclinic.git' + branch: 'develop' + } + } + stage('build') { + steps { + sh 'export PATH="/usr/lib/jvm/java-1.17.0-openjdk-amd64/bin:$PATH" && mvn clean package sonar:sonar -Dsonar.organization=nagendra4aa5 -Dsonar.projectKey=nag4a5' + } + } + stage('post build') { + steps { + archiveArtifacts artifacts: '**/target/*.war', + onlyIfSuccessful: true + } + } + } +} \ No newline at end of file