Hi,
We are starting to use ADO pipline for running sonarqube analysis and running into the below issue:
ALM: Azure DevOps Server 2020 Update 1.1
CI: Azure Devops Pipeline
Git Repo: Azure DevOps git
Languages: java (mainly)
SonarQube version: Developer Edition 9.6 (build 59041)
For sonarqube we are using the following for prepare followed by analysis. We have a non-standard main branch xyz/master instead of master. Main branch xyz/master is already analyzed and appears as main branch on sonarqube
- task: SonarQubePrepare@5
inputs:
SonarQube: ‘Pipeline Sonarqube Connection’
scannerMode: ‘CLI’
projectKey: ‘xxxxxxxxxxxxxxxx’
projectName: ‘xxxxxxxxxxxxxxx’
extraProperties: |
sonar.pullrequest.base=xyz/master
When running PR builds we are getting the following error. I am not setting sonar.branch.name anywhere.
##[error]ERROR: Error during SonarScanner execution
ERROR: A pull request analysis cannot have the branch analysis parameter ‘sonar.branch.name’
Gopi