Verified Commit 84e5743f authored by Johannes Visintini's avatar Johannes Visintini
Browse files

Jenkins: update sonarcloud integration CLI parameters

parent 1de2282b
Pipeline #3341 passed with stage
in 0 seconds
......@@ -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