mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2024-12-04 10:34:42 +02:00
Добавил возможность использовать МР при использовании gitlab-branch-source-plugin
This commit is contained in:
parent
b690f544f5
commit
d75ce1a79f
@ -39,7 +39,13 @@ class SonarScanner implements Serializable {
|
||||
String sonarCommand = "$sonarScannerBinary"
|
||||
|
||||
if (config.sonarQubeOptions.useBranchPlugin) {
|
||||
sonarCommand += " -Dsonar.branch.name=$env.BRANCH_NAME"
|
||||
if ($env.CHANGE_ID){
|
||||
sonarCommand += " -Dsonar.pullrequest.key=$env.CHANGE_ID"
|
||||
sonarCommand += " -Dsonar.pullrequest.branch=$env.CHANGE_BRANCH"
|
||||
sonarCommand += " -Dsonar.pullrequest.base=$env.CHANGE_TARGET"
|
||||
} else {
|
||||
sonarCommand += " -Dsonar.branch.name=$env.BRANCH_NAME"
|
||||
}
|
||||
}
|
||||
|
||||
String projectVersion = computeProjectVersion()
|
||||
|
Loading…
Reference in New Issue
Block a user