← All insightsCI/CD

Integrating SonarQube into your CI/CD pipeline

Nir Geier, CodeWizard · 25 October 2025 · 3 min read · Intermediate

Getting SonarQube into your pipeline is where it starts paying off - automated, repeatable and reviewed. Here is a working integration and the habits that keep it reliable.

A working pipeline snippet

Scan and fail on the Quality Gate.

yaml
- uses: sonarsource/sonarqube-scan-action@v3
  env:
    SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
    SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: sonarsource/sonarqube-quality-gate-action@v1

Do this

  • Enforce a 'new code' Quality Gate on every PR
  • Wire coverage reports into the scan
  • Triage security hotspots, don't blanket-ignore them

Avoid this

  • Analyzing but not enforcing the Quality Gate, so nothing improves
  • Chasing a green gate by disabling rules instead of fixing issues
  • No coverage report wired in, so coverage looks like zero

Want senior help putting SonarQube to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult