From 5c6309ceaa0a3d884773436c7e8d128eed550c85 Mon Sep 17 00:00:00 2001 From: ametgud4u <64977602+ametgud4u@users.noreply.github.com> Date: Tue, 7 Jul 2020 00:45:24 +0530 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8b1378917..b13274916 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,28 @@ +node('master'){ + stage('scm'){ + git 'https://github.com/ametgud4u/spring-petclinic.git' + } + stage('build'){ + sh label: '', script: 'mvn clean package' + } + + stage('postbuild'){ + junit '**/target/surefire-reports/*.xml' + archiveArtifacts 'target/*.jar' + } + + stage('Sonar') { + withSonarQubeEnv('sonar') { + sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar' + } + + stage("Quality Gate") { + steps { + timeout(time: 1, unit: 'HOURS') { + waitForQualityGate abortPipeline: true + } + } + } + } + }