GitHub Pull Request Decoration images are broken

SonarQube:
Version: 7.9.1.27448
Developer Edition
Offline Distribution

Sonar Scanner Windows:
Version: 4.0.0.1744

Git Plugin:
Version: 1.8 (build 1574)

GitHub Authentication for SonarQube:
Version: 1.5 (build 870)

I am currently trying to automatically analyze pull requests in GitHub from my Jenkins environment. I have this mostly working, so far the following works correctly:

  1. Pull Request Analysis in SonarQube is automatically kicked off when a Pull Request is opened.
  2. Pull Request Analysis is successful and is uploaded to SonarQube
  3. SonarQube decorates the PR in the checks tab in GitHub.
  4. The links in the PR decoration link back to our SonarQube server.

The issue I am stuck on is that all of the images in the PR Decoration are broken links because they point to “localhost” instead of pointing to my server’s address. See below picture to see what I am seeing.

I have set the “Administration -> General -> Server base URL” to my server’s address and this is what resolved a similar issue I had with the links. It seems the images do not respect that setting though. Is there a setting I am missing?

Hi,

You’re not the only one to notice this! :wink:

It’ll be fixed in 8.0:

SONAR-12329 - Missing icons in GitHub Enterprise PR decoration

 
Ann

Thanks I thought I read the other posts and saw people saying it was already resolved so figured I was missing something. Any idea when that fix would be coming? I am currently in the evaluation period for the Developer Edition and need to prepare an analysis of the features for my organization to decide if we are going to purchase it. Would be helpful if I could highlight that it would be fixed around a certain date.

Hi Daniel,
The issue is fixed in 8.x but there is a workaround for 7.9.x so you don’t have to wait. Restarting SonarQube instance after setting a proper sonar.core.serverBaseURL should fix the problem.

1 Like

Hi,

…and the current target release date for 8.0 is the end of Sept.

 
:slight_smile:
Ann

Thank you both for your help. Restarting the server worked and the icons appeared after I reran my Jenkins job.

2 Likes

Hi,
I’m using the developer edition 8.1 and I have the images broken in my PR Decoration. The links to Sonarqube are pointing to the right place as I set the Server Base URL parameter but the icons are still broken.

As a detail, I run my Sonarqube instance in a VPN protected URL but I’m logged in my VPN when accessing the PR decoration page in GitHub.

When inspecting the page, l see this code:

<img src="https://camo.githubusercontent.com/1855cf7b0d7929b021203c76fa13f4ae866a9614/68747470733a2f2f736f6e6172717562652e746f6f6c732d6b38732e68656c6c6f66726573682e696f2f7374617469632f646576656c6f7065722d7365727665722f636865636b732f436f76657261676543686172742f4e6f436f766572616765496e666f2e737" alt="No Coverage information" title="No Coverage information" data-canonical-src="https://MY SERVER URL/static/developer-server/checks/CoverageChart/NoCoverageInfo.svg" style="max-width:100%;">

Accessing https://MY SERVER URL/static/developer-server/checks/CoverageChart/NoCoverageInfo.svg displays the image successfully.

Any thoughts?