Commit a9f7f11e authored by Johannes Visintini's avatar Johannes Visintini
Browse files

Merge branch 'update-sonarcloud-integration' into 'master'

Jenkins: update sonarcloud integration CLI parameters

See merge request !19
parents dfe7d6ad 6f6dc115
Pipeline #3351 created
......@@ -62,7 +62,17 @@ pipeline {
steps {
script {
withSonarQubeEnv('sonarcloud GIScience/ohsome') {
sh "mvn $MAVEN_GENERAL_OPTIONS sonar:sonar -Dsonar.branch.name=${env.BRANCH_NAME}"
SONAR_CLI_PARAMETER = ""
if (env.CHANGE_ID) {
SONAR_CLI_PARAMETER += " " +
"-Dsonar.pullrequest.key=${env.CHANGE_ID} " +
"-Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} " +
"-Dsonar.pullrequest.base=${env.CHANGE_TARGET}"
} else {
SONAR_CLI_PARAMETER += " " +
"-Dsonar.branch.name=${env.BRANCH_NAME}"
}
sh "mvn $MAVEN_GENERAL_OPTIONS sonar:sonar ${SONAR_CLI_PARAMETER}"
}
report_basedir = "/srv/reports/${REPO_NAME}/${VERSION}_${env.BRANCH_NAME}/${env.BUILD_NUMBER}_${LATEST_COMMIT_ID}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment