Adding SonarQube badge to Devops Dashboard / wiki is not working

We are running a locally hosted SonarQube Developer edition Version 8.4.1 (build 35646) and have it succesfully integrated with Azure Devops Services

As long as we are logged in into the SonarQube environment we can see the project status badges.

The badges disappear as soon as we copy the link to the badge and add it to a resource outside of the SonarQube webinterface. The developer tools of the used webbrowser shows a 404 status code, indicating issues with authentication / authorization.

This way, the badge functionality provided by SonarQube is of limited added value since badges cannot be incorporated in a general dashboard.

Any help on how to resolve these authentication issues is highly appreciated.

2 Likes

Hi,

If this is a project that Anyone (anonymous) is not authorized to view, then badges aren’t going to work.

 
:woman_shrugging:
Ann

Hi Martijn,

Can you please confirm that your projects are private?

Chris

Hi Ann and Chris,

I checked and the projects are not private but public. I have enabled anonymous access to browse the SonarQube project. Unfortunately it still does not work as expected.

However, if I copy the link to the badge contents itself and paste it in the browser address bar, the badge is correctly displayed.

Most likely the issue lies in the communication between the SonarQube server we host and the publicly hosted Azure DevOps environment that is not allowed to access the corresponding badge.

Thanks for your help.

1 Like

Hi @ganncamp @Chris ,

Has this been fixed with the latest release of SonarQube? We are also having this same issue with badges. We are still on 8.4 for now.

Thanks!

Hello Ann,

I am having the same issue, my project all are public, but when I try to put the badge at Readme.MD all images are broken.

README.MD->
Screen Shot 2021-05-18 at 11.22.52 AM
As you can see the CI can show the badge…

BROWSER->
Screen Shot 2021-05-18 at 11.11.26 AM