How to Create Quality Gate in SonarQube and Integrate with GitHub Actions CICD Pipeline

Published: 12 March 2024
on channel: DevOps Coach
2,360
53

https://www.coachdevops.com/2024/03/h...
What is Quality gate?
In SonarQube a quality gate is a set of conditions that must be met in order for a project to be marked as passed.

Pre-requisites:
Make sure SonarQube is up and running
Make sure Java Project is setup in GitHub
SonarQube is already integrated with GitHub Actions
SONAR_HOST_URL and SONAR_TOKEN configured as secrets in GitHub Repo

How to Create Quality gate in SonarQube and integrate with GitHub Actions?

Make sure SonarQube is up and running and integrated with GitHub Actions. Please click here if you would like to setup SonarQube and integrate with GitHub Actions.

We will be executing below steps:
Login to SonarQube
Create Quality Gate in SonarQube
Add conditions in Quality Gate
Make quality gate as Default
Create GitHub Actions CICD workflow yaml
Add tasks for Maven build and Sonar Scan
Add tasks for integrating Quality gate
pass/fail the builds in SonarQube


Watch video How to Create Quality Gate in SonarQube and Integrate with GitHub Actions CICD Pipeline online without registration, duration hours minute second in high quality. This video was added by user DevOps Coach 12 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,360 once and liked it 53 people.