Skip to content

Commit 1d9743e

Browse files
committed
changed sonar scan to use GIT URL for project name
1 parent 2497e56 commit 1d9743e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ pipeline {
147147
}
148148

149149
void runSonarScanner() {
150-
def changeUrl = env.CHANGE_URL.split("/")
150+
def changeUrl = env.GIT_URL.split("/")
151151
def org = changeUrl[3]
152-
def repo = changeUrl[4]
152+
def repo = changeUrl[4].substring(0, changeUrl[4].length() - 4)
153153
if (changeRequest()) {
154154
sh "mvn -B sonar:sonar \
155155
-Dsonar.projectKey=${org}_${repo} \

0 commit comments

Comments
 (0)