We are using Azure DevOps for ALM and CI/CD (the repo is private). The build pipeline is connected to SonarCloud, and in SonarCloud we can see the analysis taking place and branches; however none of the pull requests are being shown in SonarCloud. The links from Sonarcloud back to the repo in DevOps are working, but no pull requests are being shown; I think that as a result the pull request integration is not working.
Are there some troubleshooting steps that would help track down the issue? Here are the steps I have tried so far:
- Resetting the PAT being used by the project to connect to DevOps
- Increasing the permissions granted to the PAT in DevOps
- Run analysis on the default branch (develop) multiple times
Welcome to the community!
Can you share an analysis log for a PR that’s not visible in SonarCloud?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
This guide will help you find them.
prepare-output.txt (2.5 KB)
analyze-output.txt (35.9 KB)
I have attached the output from the prepare / analyze steps that are available from the build pipeline.
This is the page I followed for setting up the connection between SonarCloud and Azure DevOps:
This log is for a short-lived branch analysis:
Branch name: do_sonar_pullrequests, type: short-lived
My understanding is that the branch/PR values are recognized in the environment and populated into analysis automatically. Is your build policy set to run on PRs?