Must-share information (formatted with Markdown):
-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) => SonarQube Version 8.2.0.32929
-
what are you trying to achieve => As soon as we create a new pull request in bitbucket datacenter (Bitbucket v6.6.1), how do we automatically trigger a scan and display the results on sonarqube.
-
what have you tried so far to achieve this
I am able to do it manually when I have the following lines in the Jenkins file:-Dsonar.pullrequest.branch=$env.BRANCH_NAME
-Dsonar.pullrequest.base=develop
-Dsonar.pullrequest.key=1
Inside the Jenkins file I want the following line:
-Dsonar.branch.name=$env.BRANCH_NAME
If I understand this correctly, we can have only one of the above two configuration. I do not want to change the configuration inside the Jenkinsfile every time a developer creates a pull request in bitbucket.