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 .
this is your second jenkins related post.
Did you configure a custom log recorder in Jenkins as proposed here ?
To see what’s going on in Jenkins you should create a custom Jenkins Sonarqube logger
(/manage/log/new) with configuration logger hudson.plugins.sonar and org.sonarsource .
And do you use the Sonarqube scan in parallel step ?
Because we had intermittent timeouts when trying to speed up our npm builds via running 1-n Sonarqube scans in parallel.