mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:35:50 +00:00
test
This commit is contained in:
parent
b9c9626626
commit
a5aa18e619
1 changed files with 10 additions and 4 deletions
|
@ -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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue