The SonarQube quality gate step waits until timeout on every build, even though analysis completes. Design the correct integration.
IntermediateScenarioIntegrations & delivery
Answer
Situation read → SonarQube is not calling back Jenkins.
What I'd do →
- Configure a SonarQube webhook to
https://jenkins.example.com/sonarqube-webhook/(trailing slash), with a secret matching the Jenkins Sonar server config. - Ensure network connectivity from SonarQube to Jenkins.
- Keep
waitForQualityGatein the same build afterwithSonarQubeEnv, withtimeout(time: 10, unit: 'MINUTES'). - Run the gate step outside the agent pod if possible to avoid holding resources.
Why → The step is event-driven; without the webhook it only times out.
Interview tip → Mention report-task.txt linking the analysis to the build.
More on Integrations & delivery
You need to publish Java artifacts: snapshots on every `main` build, releases on tags. Design with Nexus.IntermediateDevelopers want to deploy to Kubernetes from Jenkins, but security does not want cluster-admin kubeconfigs in Jenkins. What do you propose?AdvancedTrivy blocks a release because of a HIGH CVE in a base image package with no fix available. Business wants to ship. What do you do?IntermediateImage builds take 9 minutes in Kubernetes pods because nothing is cached. How do you add caching with Kaniko?IntermediateA pipeline should promote the exact image that passed staging to production, not a rebuild. How do you guarantee it?IntermediateYour SonarQube analysis must decorate PRs with comments and fail PR builds on new issues only. How do you configure the pipeline?Advanced