Sonarqube Version: 8.4.1
Description: Noticed behavior where sonarqube is not reporting to results to the correct branch when Azure DevOps YAML pipeline checks out multiple repositories.
Reproduction Steps:
- Create basic Azure DevOps YAML Pipeline with 2 checkout steps.
-
checkout: self (Develop Branch)
-
checkout: git://Products/DevOps@refs/heads/master
- Run Pipeline for Develop Branch
- Will notice that all results are uploaded to Master branch for provided project key instead of scanned branch Develop
Has anyone experienced the same outcome as above and how were you able to resolve to have sonarqube only upload to desired branch?
Attempted workaround:
Tried to provide sonar.branch.name manually as part of the configuration. This fixed the issue, however you cannot use sonar.branch.name when scanning a Pull Request…