Is quality-gate-check action needed if sonarqube-scan is present in GH workflow?

Must-share information (formatted with Markdown):

  • SonarQube 10.2.1.78527
  • How is SonarQube deployed: Helm
  • Clarify if I need the quality gate GH action or it’s covered by the sonar action
  • added both actions to the WF (sonarqube-quality-gate-action, sonarqube-scan-action )

Hi Community. I hope someone can clarify if sonarqube-quality-gate-action action is needed or not in my workflow if I already have sonarqube-scan-action ?

I’m asking because the scan action already has the quality gate step, it comments the results to the GitHub PR and breaks the WF if there is a problem. So having a separate quality-gate action seems unnecessary. Ty.

Hey there.

sonarqube-quality-gate-action works well if you want to break the build of your target branches on a QG failure (and not just your PRs), but it’s not strictly necessary.

Thanks for the answer, but I’m still a bit confused.
Technically it’s possible to add sonarqube-scan-action to the build to any branch regardless of the PR. Eg if there is a merge/rebase etc. So it will also break the build there…(if I pass the qgate flag)

I thought sonarqube-quality-gate-action was more about the ability to split the scan and the Q gate into two different parts of the lifecycle of a change.

It’s a nice easy way to break the build (instead of adding an analysis parameter), but both have the same effect in the end.

sonarqube-quality-gate-action also lets you move on in case you want to do other things before you wait for the Quality Gate status.