For GitHub Enterprise, the minimum version is 2.14 Creating a GitHub AppYou can add Pull Request decoration under the GitHub Checks tab or Conversation tab. To do this, an instance administrator must first create a GitHub App:
Installing your appInstall your GitHub App from the app's settings page. See the GitHub instructions for more information. Setting your global settingsTo set your global settings in SonarQube, navigate to Administration > Configuration > General Settings > ALM Integrations and select the GitHub tab. From here, set your Configuration Name, GitHub Instance URL, GitHub App ID, and your GitHub App's Private Key (that was generated above in the Creating a GitHub Appsection). Note: Make sure the Configuration name is succinct and easily recognizable as it will be used at the project level to identify the correct ALM configuration. Setting your project settingsGo to Project Settings > General Settings > Pull Request Decoration, select your Configuration Name, and set your Repository identifier. By default, Enable analysis summary under the GitHub Conversation tab is on and your Pull Request analysis will be shown under the Conversation and Checks tabs in GitHub. Turning this setting off will make it so Pull Request analysis is only shown under the Checks tab. |
https://github.com/JetBrains/TeamCity.SonarQubePlugin/issues/69
Adding Pull Request Analysis (in GitHub Pull Request decoration for sample), configuring parameters could be a little tricky. You have parameters:
All these parameters could be retrieved from TeamCity build parameters (at least for GitHub). If it can be provisionned by a TeamCity Build Feature, it would be great !! This feature request is like the Using SonarCloud with Travis CI, which is very usefull. Technically, it seems to work with the SONARQUBE_SCANNER_PARAMS system environment variable ; available since SonarQube Scanner API v2.7 (SCANNERAPI-159) & SonarQube Scanner for Maven v3.1 (MSONAR-147). Content of this sysenv depending the build (Here GitHub+Travis classic & PR builds):
And you are right, if these data (PR feature) can be used, the mapping can be done more easiest than some build parameters. Currently I can see for GitHub PR (EDITED 24/10: Update with last TW-61490 remark ; Pull Requests TeamCity plugin version 66559 at min).
|