The tutorial for setup of SonarQube states the following.
- Why is failing the PR not recommended based on UT Coverage or other quality gates?
- Deployments take place from CD, not CI. We do trunk based development with Artifact promotion (dev → stage → prod) where as the Artifact passes SQA it moves to different environments. Code is not prompted into different environments, artifacts are. How would sonarqube fail a deployment in this case?
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# We do not recommend to use this in a pull request. Prefer using pull request
# decoration instead.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}