I have an on-premise installation of SonarQube that I want to receive code analysis webhooks from. I followed the Atlassian instructions to set up an organisation-level webhook in SonarQube and pasted in the generated webhook URL that Compass created for me. I then added a link to the SonarQube project to the Dashboard links of my Compass component. Finally, I made a code change on my GitHub-hosted repo; SonarQube ran its analysis task, and I can see that it published a successful analysis result to Compass, receiving a 202 Accepted response code.
However, the Sonar Quality Gate scorecard that I added to my project is still reporting a failing status, and if I click on the scorecard, it asks me to connect the metric to a data source.
From SonarQube's point of view, everything has gone correctly; how can I identify where my metrics have disappeared to in Compass?
Ugh, never mind. I finished typing this question in, went back to my project and saw that there was a different metric receiving the data from the webhook; I changed my scorecard to use the correct metric (quality-gate-conditions-passing) and now everything is working as expected.
The link to the SonarQube project needs to be added to the Projects section of Links; SonarQube itself needs to be set up as an incoming webhook, which feeds the "Quality gate conditions passing" metric, which is displayed through the "Sonar Quality Gate" scorecard. So, a few moving parts to connect up, but hopefully this gives enough information to point you in the right direction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.