From f7f25439ebe442c3470888e7a259452eba7d586b Mon Sep 17 00:00:00 2001 From: jhansi06 Date: Tue, 16 Dec 2025 13:21:30 +0530 Subject: [PATCH] sonar --- Jenkinsfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index b1a0f4a6e..1a3217103 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,5 +20,21 @@ pipeline { """ } } + + stage("Sonar-Scanning") { + steps { + withSonarQubeEnv('sonarqube') { + sh """ + + ${tool 'SonarScanner'}/bin/sonar-scanner \ + -Dsonar.projectKey=spring-petclinic \ + -Dsonar.projectName=spring-petclinic\ + -Dsonar.sources=. \ + -Dsonar.sourceEncoding=UTF-8 + """ + } + } + } + } } \ No newline at end of file