Sonar - Azure DevOps Connection (Quality Gate report for PR)

  • which versions are you using?

Developer Edition - Version 9.2.1 (build 49989)

  • what are you trying to achieve

Connect SonarQube (OnPremise) to Azure DevOps Server (OnPremise)

  • what have you tried so far to achieve this

Created a connection between the Azure DevOps Server and SonarQube - the configuration check succeeds.
Tried multiple PR - the code gets analysed, but the Quality Gate can’t be pushed to Azure DevOps

I get to warnings which I don’t know how to handle:

  1. Usage of parameter ‘sonar.pullrequest.provider’ from the scanner is deprecated. Please configure this parameter in the configuration of your project.

  2. Pull Request decoration failed: Unable to contact Azure DevOps server

And here is the log:

2023.01.11 11:25:50 INFO  ce[AYWglEOvyPOIxpAuDQFP][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | status=SUCCESS | time=0ms
2023.01.11 11:25:50 INFO  ce[AYWglEOvyPOIxpAuDQFP][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=1ms
2023.01.11 11:25:50 WARN  ce[AYWglEOvyPOIxpAuDQFP][c.s.F.D.D.C] Pull Request decoration failed: Unable to contact Azure DevOps server
2023.01.11 11:25:50 INFO  ce[AYWglEOvyPOIxpAuDQFP][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=48ms
2023.01.11 11:25:50 INFO  ce[AYWglEOvyPOIxpAuDQFP][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Report branch Quality Gate status to devops platforms | status=SUCCESS | time=0ms
2023.01.11 11:25:50 INFO  ce[AYWglEOvyPOIxpAuDQFP][o.s.c.t.CeWorkerImpl] Executed task | project=ifi_ic.one.core.framework | type=REPORT | pullRequest=406 | id=AYWglEOvyPOIxpAuDQFP | submitter=ifi | status=SUCCESS | time=373ms

Do you have any suggestions?

Hey there.

Logs for connecting to Azure DevOps improved greatly in SonarQube v9.x (specifically v9.5 if I remember correctly). At this point, v9.2.1 is considered EOL.

My first recommendation would be that you upgrade to SonarQube v9.8, the currently supported version of SonarQube v9.x.

If the issue persists, check the logs again. You can also raise the log level in the global Administration > System > Log Level for more details.