I’m currently using SonarQube Community Edition and have a question about enforcing code quality checks in feature branches before allowing merges to the main
branch. Here’s my situation:
- GitLab CI/CD Pipeline:
- We have a
.gitlab-ci.yml
file that includes different configurations for different branches:.gitlab-ci-dev.yml
for themain
branch..gitlab-ci-prod.yml
for theprod
branch..gitlab-ci-br.yml
for feature branches.
- Developers create feature branches from
main
, push changes, and then merge those changes back intomain
.
when developer create merge request the .gitlab-ci-br.yml get triggered if the sonar analysis fail the merge request blocked
I want to block merges to the main
branch if there are issues in the SonarQube analysis for the feature branch. Essentially, I want to ensure that code quality standards are met before allowing any changes to be merged into main
. is it possible in community edition