- SonarQube 9.5 Developer EDition (build 56709)
- Deployed on premise on local server
- Im trying to use quality gate integration with bitbucket
I build a feature that has a pull request ona branch feature/yyy-yyy-yyy. The pull request is shown i Sonarqube as expected. the branch originates from develop. I have several issues on the feature that should be shown in SonarQube. But the “measures” on the pull request says there are no issues found. The “Code” page on the pull request in SonarQube says 0 new lines of code even though there are 100s of new lines.
Im building my source with the sonarwrapper in a docker container. When analyzing the code on the pull request SonarQube gives a warning:
Could not find ref 'develop' in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis and refer to the documentation.
When i run a git show-refs in my jenkins pipeline i see the following:
+ git show-ref 6a82f... refs/remotes/bitbucket_prod/bugfix/xxx-xxx-xxx 6a82e... refs/remotes/bitbucket_prod/develop 261d2... refs/remotes/bitbucket_prod/feature/yyy-yyy-yyy
I have the branch feature/yyy-yyy-yyy checked out when running the analysis.
I’m wondering if sonarqube does not find develop because it is not under the standard “origin” remote. Or is there some other possible problem. We do not run submodules.
We are integrated with BitBucket. The problem is taha Sonarqube always believe that there are nothing changed since it can not find develop.
The project is setup to use develop as reference branch, except for develop that uses previous version. Analysis of develop works fine. ITs the analysis of the delta between my branch yyy-yyy-yyy and develop that does not work.
Any idea of what I can try?