We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f3204a commit cdbc8faCopy full SHA for cdbc8fa
1 file changed
CI.Jenkinsfile
@@ -17,9 +17,12 @@ node ("docker-light") {
17
bash -c \"apt-get update && \
18
apt-get install -y git && \
19
pushd /source && \
20
- /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar \
21
- -Dsonar.login=${env.SONAR_AUTH_TOKEN} \
22
- -Dsonar.host.url=${env.SONAR_HOST_URL}\""
+ MY_SONAR_OPTS=\"-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}\" \
+ if [[ ! -z ${env.CHANGE_BRANCH} ]]; then
+ MY_SONAR_OPTS+=-Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}
23
+ fi \
24
+ echo \"Sonar Options are: ${MY_SONAR_OPTS}\" \
25
+ /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar ${MY_SONAR_OPTS}\""
26
}
27
28
slack(true)
0 commit comments