From ac53e27691780b2b7d8914d585c31d8f4b68f996 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 8 May 2017 10:51:31 -0700 Subject: [PATCH] Updated Jenkinsfile --- Jenkinsfile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c758837da..c4bd8fbee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,13 +1,24 @@ pipeline { agent any tools { - maven 'maven-3.5.0' + maven 'Maven' } stages { stage ('Build') { steps { - git 'https://github.com/liatrio/spring-petclinic' - sh 'mvn clean install' + git branch: 'plumber_dmitry', url: 'https://github.com/liatrio/spring-petclinic.git' + sh 'mvn deploy' + } + } + stage ('Sonar Analysis') { + steps { + script { + scannerHome = tool 'Sonar' + } + + withSonarQubeEnv('Sonar') { + sh "${scannerHome}/bin/sonar-scanner" + } } } }