Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
ADO task “Prepare Analysis Configuration ver:5.0”
- how is SonarQube deployed: zip, Docker, Helm
Not sure about this because is managed by a different department, my best guess would be Docker because for other solutions Docker is the standard
- what are you trying to achieve
ystem-wide we were downgraded from SonarQube “Developer Edition” to “Community Edition” since then we are experiencing the error from the title of this threat, see below snippet, and more importantly is creating a failure in the SonarQube task “Run code Analysis”
##[error]ERROR: Validation of project failed: o To use the property “sonar.branch.name” and analyze branches, Developer Edition or above is required. See Branch analysis for more information.
- what have you tried so far to achieve this
Researching on the internet found the next powershell script but there isn’t much context on how it should be implemented, see below snippet, because is it through a variable passing a “command call” for removing the usage of “sonar.branch.name” but this should be pick-up by a task from what I know by working with ADO:
$params = "$env:SONARQUBE_SCANNER_PARAMS" -replace '"sonar.branch.name":"[\w,/,-]*"\,?' Write-Host "##vso[task.setvariable variable=SONARQUBE_SCANNER_PARAMS]$params"
When I do implement this task all the Unit-test fails, so the unit test task hangs until ADO by timeout closes the Pipeline run
Maybe should I Add this task before the “Prepare Analysis Configuration” task and afterwards pass the variable $param to the “advance” section of the Task “Prepare Analysis Configuration”? see screenshot below:
All help will be super welcome!
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!