From 465db44b54751d0e80b1970a94ca81839fcf6149 Mon Sep 17 00:00:00 2001 From: Bharatkumar5690 Date: Fri, 10 Mar 2023 10:37:47 +0530 Subject: [PATCH] changes in all branches --- Jenkinsfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..5e4b99425 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent { label 'Master' } + triggers { pollSCM ('* * * * *') } + stages { + stage('vcs') { + steps { + git url: 'https://github.com/spring-projects/spring-petclinic.git', + branch: 'uat' + } + } + stage('package') { + 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' + } + } + stage('sonar analysis') { + steps { + // performing sonarqube analysis with "withSonarQubeENV()" + withSonarQubeEnv('SONAR_CLOUD') { + sh 'mvn clean verify sonar:sonar -Dsonar.login=ea06c1ce5d1ee81e35db29d8cb0de69b42c70278 -Dsonar.organization=springpetclinic-2 -Dsonar.projectKey=springpetclinic-2_bharat' + } + } + } + } +}