Hi,
I am trying to publish sonar results for my feature. But I am getting error always.
Was not able to fetch data for Sonar project "ngms-dictate-api:feature/NGM-14639". Either your pull request has not been analyzed yet, a non-existing Sonar project is referenced, you use the commercial branching feature of SonarQube >= 6.7 but have not enabled this in the repository settings or you have upgraded SonarQube without restarting the plug-in (disabling and re-enabling in the UPM). You can configure the Sonar project in the repository settings.
My base branch is 'master'. I forked out a feature branch out of it. After my checkin on feature branch I created a PR for feature branch taking master as my base branch.
I have enabled sonar on bitbucket for this repository. My expectations is to generate sonar results once I create a PR but it's failing with above error.
I already has sonar results published for master branch on our sonarqube website.
Please help to resolve the issue.
Hi,
Have you already analysed your feature branch with SonarQube, i.e. are there analysis results for "feature/NGM-14639"?
The app Sonar for Bitbucket doesn't trigger an analysis itself, this is something that must be done on the CI/CD side for every branch of your pull requests.
Best regards,
Michael (app vendor)
Do we need to setup CI pipeline also with sonar from bitbucket ?
Do we need to have analysis before creating pull request so that it can read sonar results ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to setup a SonarScanner invocation task in your CI pipeline.
You should run the Sonar analysis for every branch. As soon as the analysis is finished, you will see the results in your pull request (it doesn't matter if the analysis is finished before or after creating the PR when using app version >= 3 as the results are bound to the commits).
There is a merge check in the app that allows you to prevent merging a PR if the analysis results do not exist.
Does that help you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This helps.
One more question -
Base branch took time around 20 min to complete. Will it take same time again if analysis ran on feature branch or will it run only on new changes ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.