It seems that the latest release of sonar-scanner-vsts (5.16.0, released today, Release SonarQube extension 5.16.0 · SonarSource/sonar-scanner-vsts · GitHub) has broken the SonarQubePrepare@5 task for Azure DevOps for the Community Edition. The SonarQubePrepare@5 task started throwing the following error in our Azure DevOps pipeline today:
ERROR: Validation of project failed:
o To use the property "sonar.branch.name" and analyze branches, Developer Edition or above is required. See https://docs.sonarsource.com/sonarqube/10.2/analyzing-source-code/branches/branch-analysis/ for more information.
We do not set the “sonar.branch.name” explicitly anywhere, and we are analyzing the default branch of the project.
From what I can see, a recent change in the Prepare task made it so the “sonar.branch.name” property is always set for non-PR builds, instead of only if the analysis is not on the default branch: VSTS-317 Prepare task shows redundant warning when sonar.branch.name is provided in extra params by stanislavhh · Pull Request #293 · SonarSource/sonar-scanner-vsts · GitHub
We are using SonarQube Community Edition 10.2.1.78527
Thanks for the quick feedback. I’ve flagged this for attention.
Thanks for this report. We have a change in progress. It should be released within about an hour.
Well… We’ve been struggling with the release mechanism and are going to step away from this until tomorrow morning (in Europe).
Sorry for the delay.
A new version of the extension should be pushed to your Azure DevOps instance very soon that fixes this.
I can confirm that the issue is fixed for us. Thanks for the quick response!
I can also confirm the issue is also fixed in 17.01 at azure devops. thanks
In version 5.17.2 I have still the same error.
I use TFVC as source control system.
2 posts were split to a new topic: ADO Extension broken
Nice to hear that the issue was fixed for most of you.
@gclpixel , there is a known limitation for AzDO extension with SQ Community where you can not use a main branch named differently than “master” on any provider (except Azure Repos).
If you are having issues with an edition that supports branches, you can also specify the branch to be used in your pipeline, in the Prepare task under extra properties:
- task: SonarQubePrepare@5
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
Hope this helps!