We are facing an intermittent issue with SonarQube for our Jenkins pipeline.
In our pipelines, we have two sonarqube-related stages - 1. SonarAnalysis, which analyses the code and creates a report. 2. Quality Gate Check checks the status of Quality Gate for the earlier scan and sends back that status to the Jenkins pipeline.
But sometimes, during the Quality Gate check stage, Jenkins does not receive the status back and the task will show as in progress till the timeout period is completed and then the Jenkins job fails. After re-triggering the pipeline 2-3 times, we are able to see the QG status being received by Jenkins. Can you please advise on why this might be happening?
Few points to note here:
we use a sonarqube webhook to connect our jenkins to sonarqube server
Both jenkins server and sonarqube server are in the same network
We checked our network logs for this, and did not find any connection drop from either sonarqube or jenkins end
What is the status of the Webhook delivery? Depending on whether this is set at a global or project level, you can see the deliveries in the global Administration > Configuration> Webhooks or project level Project Settings> Webhooks .