Displaying Sonar Analysis results in Azure pipleline

Hi Team,

Is there a way to display the Sonar Analysis results in Azure Devops.I have tried to set up PR decoration in Sonar Cloud, but it isnt working.

Could you please help me in this.

Kind Reagrds,
Renjini.

Hi Renjini,

This may seem like a dumb question, but what about it isn’t working?

The PRs aren’t analyzed? Or they’re analyzed, but the results don’t show up in ADO?

 
Ann

Hi Ann,

The PRs are analyzed by Sonar Cloud, I wanted to decorate the results by displaying them in Azure Devops ,as it is mentioned in the below docs, there is a way to decorate the results in Azure devops.

And that was my query, let me know if I am still not making any sense or if my query is confusing. Also please let me know if this decoration will only work when the quality check fails and not during a successful analysis.

Kind Regards,
Renjini.

Hi Renjini,

Did you onboard your projects into SonarCloud through the UI’s onboarding Wizard?

 
Ann

Hi Ann,

Do you mean if I have imported the projects in Sonar Cloud UI?- Yes I did that and I can see the analysis results in Sonar Cloud UI for the Project. I wanted to check if there is a way to display the Sonar Cloud Analysis results directly as soon as the pipeline finishes at Azure rather than the user wanting to navigate to Sonar Cloud UI and check results.

Kind Regards,
Renjini

Hi Renjini,

What I’m trying to find out is how you initially added the projects to SonarCloud. If you did it through the onboarding wizard, then I believe they should already be configured to show PR analysis results. If not, then additional configuration is required.

 
HTH,
Ann

Hi Ann,

I think I havent used On Boarding wizard, Could you please let me know the additional configurations.

Kind Regards,
Renjini.

Hi Renjini,

Unfortunately I’m not able to log into SonarCloud with an Azure account to test this directly, but take a look at the project Administration → General Settings → Repository binding

 
HTH,
Ann

Hi Ann,

Thank you for your help, apparenlty I was not looking at the correct location with in azure devops , I had to just navigate to Extensions with in my pipeline results. And my initial configurations did work :).

Kind Regards,
Renjini,

1 Like