0

sonarqube quality gate status check shows waiting in azure devops pipeline for few projects. where as this works fine for other projects.

I verified and the PAT seems okay.

Lenter image description hereet me know what could be the reason?

using sonarqube 8.5 V

priya
  • 391
  • 1
  • 5
  • 24
  • Could you please check the quality gate status for the PR in SonarQube server dashboard? You should also post `build logs` in the question, for the **SonarQubeAnalyze** and **SonarQubePublish** tasks with _debug_ flag activated -- so that we could help finding the root cause... – Jay Apr 12 '21 at 14:24
  • I am not able to see ```SonarQube/quality gate``` in the status check of Azure DevOps Branch policy. Do we need to setup any configuration for it? – AkshayBadri Nov 17 '21 at 18:37

2 Answers2

0

Waiting means analysis is not completed yet due to pending background task. Although, the execution is SUCCESS i.e. sonarscanner has finished analyzing the code but the processing of analysis report is not yet being processed by SonarQube server.

The final processing is done by Compute Engine (CE). CE process the reports serially thus the projects are waiting in queue.

You can increase the number of workers of CE to process more reports at the same time.

More details:

  1. https://docs.sonarqube.org/latest/analysis/background-tasks/

  2. https://docs.sonarqube.org/latest/instance-administration/compute-engine-performance/

Sourav
  • 3,025
  • 2
  • 13
  • 29
0

In our case, it was the PAT token, that was expired. Steps we followed,

Login to SonarQube portal, Administration--> Configuration >> ALM Integration >> Azure Devops

you would see the warning over there, "Invalid Azure Url or Personal Access Token".

if that is the case,

then login to your Azure Devops portal>> User Settings>> Personal Access Token >> put on the name for token >> and select the required scopes >> Read & Write.

Save, copy the token.

And take this token from Azure Devops portal and update it on the Sonar Qube portal.

That's it.

This was specific to my case. Your case might be different. This is one of the cases you want to check.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
AstroBoy
  • 337
  • 3
  • 16