Hi,
Some posts in this community forum relates some difficulties to integrate “Pull Request Analysis” with TeamCity, mainly due to deal with scanner parameters execution.
I would like to improve this high value feature, and improve TeamCity SonarQube plugin as “first class citizen” about this integration. => #69.
The best way is to deal that with environment variables, filled depending environment execution (VCS/SCM properties, …). Analysing the SonarCloud & Travis integration, I discover the parameter SONARQUBE_SCANNER_PARAMS, nice ! very helpfull .
For GitHub, I have the content, like:
SONARQUBE_SCANNER_PARAMS = { "sonar.pullrequest.key" : "1", "sonar.pullrequest.branch" : "branch", "sonar.pullrequest.base" : "master", "sonar.pullrequest.provider" : "GitHub", "sonar.pullrequest.github.repository" : "user-or-orga/some-repo", "sonar.organization" : "some-github-orga", "sonar.host.url" : "https://sonarqube.company.com" }
But to cover all providers on first implementation, I have some difficulties to retrieve all required parameters depending the provider (Pull Request Analysis doc is not explicit about them, parameters names are in SonarQube UI but not sure about values, I have not all Git platforms under the hand, …).
=> Is it possible to have some SONARQUBE_SCANNER_PARAMS
snippet for Bitbucket / Gitlab / VSTS ?
I’m sure it is just a copy/past from your unit tests !
Many thanks
Best regards