Search code examples
jenkinscontinuous-integrationsonarqubesonar-runnersonarqube-scan

CI information for sonarqube dashboards


We have a centralized Sonarqube setup used by large number of users. Many of the users have used CI set up in non-standard way that now we have many obsolete Sonar dashboards.

Before taking up housekeeping activity to clean up this instance of unused dashboard we need to refer CI jobs publishing these dashboards. But "Continuous integration" link in Dashboard view of Sonarqube is empty in most of the cases. Is there any way (Web UI or backend) to find the details of CI job publishing Sonar dashboard (i,e, for any selected Sonar project I want to get CI job url).

Any thoughts on this from anyone?


Solution

  • Assuming that your version of SonarQube is 5.6.x, an option is to check HTTP logs contained in the file logs/access.log. The analysis reports are sent by scanners to the URL api/ce/submit with the project key as a parameter. The logs contain the IP of the scanner machine, if it can help you...

    Example of report of project foo sent from 127.0.0.1:

    127.0.0.1 - - [13/Jan/2017:17:38:31 +0100] "POST /api/ce/submit?projectKey=foo&projectName=Foo HTTP/1.1" 200 44 "-" "SonarQubeRunner/2.5.1"