Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to generate sonar results for feature branch in bitbucket

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. 

1 answer

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 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?

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 ?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

499 views 6 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you