Skip to content

Commit

Permalink
aligned Jenkinsfile_multibranch_pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed May 9, 2022
1 parent 2fa3bf0 commit 5a8b68f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions java/Jenkinsfile_multibranch_pipeline
Expand Up @@ -58,13 +58,21 @@ pipeline {
image "$DITTO_DOCKER_IMAGE_MAVEN_JDK_8"
}
}
when {
expression {
return !params.SKIP_SONAR_SCAN
}
}
steps {
dir("$WORKSPACE/java") {
configFileProvider([configFile(fileId: 'mvn-bdc-settings', variable: 'MVN_SETTINGS')]) {
withSonarQubeEnv(installationName: "$SONAR_QUBE_ENV", credentialsId: "$SONAR_QUBE_CREDENTIAL_NAME") {
sh "mvn -s $MVN_SETTINGS --batch-mode --errors sonar:sonar -Dsonar.branch.name=${theBranch} " +
" -Drevision=${theVersion}" +
" -Dditto.version=${dittoVersion}"
echo 'Sonar Scan'
withSonarQubeEnv(installationName: "${env.SONAR_QUBE_ENV}", credentialsId: "$SONAR_QUBE_CREDENTIAL_NAME") {
sh "mvn -s $MVN_SETTINGS --batch-mode --errors $SONAR_MAVEN_GOAL " +
"-Dsonar.host.url=$SONAR_HOST_URL " +
"-Dsonar.projectKey=org.eclipse.ditto:${theBranch} " +
"-Drevision=${theVersion} " +
"-Dditto.version=${dittoVersion} "
}
}
}
Expand Down

0 comments on commit 5a8b68f

Please sign in to comment.