How to make SonarQube scan to run only on develop branch?
We have a Teamcity build which triggers when there is a commit to develop, master and feature branches.
But we want to run SonarQube scan only if the branch is develop. Is it possible to achieve without creating separate build configurations?
Please sign in to leave a comment.
Hi Karthikeyan,
unfortunately, there is no possibility of conditionally running build steps. You can extract a template from your current build configuration, then have the two separate configurations attached to the template, one which runs sonarqube only on the branch, and the other one who builds but doesn't send to sonarqube at all for the other branches. The changes to the template would be propagated to both build configurations so you would only need to maintain that for the most of it.