This commit is contained in:
Zohar 2024-04-07 15:28:01 -04:00
parent b9c9626626
commit a5aa18e619

View file

@ -4,10 +4,16 @@ pipeline {
stage('SonarQube analysis') { stage('SonarQube analysis') {
steps { steps {
script { script {
scannerHome = tool 'SonarQubeScanner'; withSonarQubeEnv("sq1"){
def mvnHome = tool "M3"
sh """
${mvnHome}/bin/mvn sonar:sonar \
-Dsonar.projectKey=Web \ // Replace with your actual project key
-Dsonar.host.url=http://localhost:9000/ \
-Dsonar.login=squ_ea9632ad9d734f30372ed61b6565f2fa028e8e5e // Replace with your actual SonarQube token
"""
} }
withSonarQubeEnv('My SonarQube Server') {
sh "${scannerHome}/bin/sonar-scanner"
} }
} }
} }