Sonar and PR analysis from Bitbucket

muheeb_shaik February 3, 2020

was not able to fetch data for Sonar project,

Either your pull request has not been analyzed yet, a non-existing Sonar project is referenced, you use the new branching feature of SonarQube 6.7 but haven't enabled this in the repository settings or you have upgraded Sonarqube without restarting the plugin.

 

I have configured Repository settings : as Branch based and Leak period also,

I am able to fetch the data only master branch not other branches.

For PR also It is giving source branch only ----not fetching feature branch. 

 

1 answer

0 votes
Michael Rüegg _Mibex Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2020

Hi,

Have you analyzed the feature branch with SonarQube as well? If yes, I suggest that you open a support case at https://support.mibexsoftware.com so that we can better analyze the problem by sharing screenshots / log files.

Thanks,

Michael (app vendor)

muheeb_shaik February 5, 2020

Yes, analised with sonarqube also, 

My requirements are :

I have selected branch based analysis on repository settings. 

Created branches master 

Child branches from master branch 

Now I have dev branch and I have updated code on devbranch

Now I am raising PR with those changes. Then Dev branch should analyse the code right? 

Michael Rüegg _Mibex Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2020

Please notice that the app will not trigger an analysis itself. Instead, this needs to be done on the CI/CD side. Have you analyzed the dev branch with Sonar?

muheeb_shaik February 5, 2020

Yes, I have analyzed dev branch with Sonar, results are showing on sonar.

Generally - on Bitbucket, Repository settings and sonar configurations, It showing the default branch master, and drop down branches also available. If we select other any branch It is watching but no results are showing.

while creating the PR from dev to master branch with updated code, It should be show the bugs and issues of dev branch right ? so that reviewer/approver can see the dev branch analysis before approving the PR. (PR analyzing with sonar scanner with PR details, after that also not showing the results).

If we can raise from master to dev- it was showing the analysis.

while it will be showing the results in this way?

Thank you!!

Michael Rüegg _Mibex Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2020

Yes, in that case it should show the results from the dev branch.

Have you analyzed your dev branch with -Dsonar.branch=dev or -Dsonar.branch.name=dev?

Which SonarQube version are you using?

muheeb_shaik February 8, 2020

Sonar Enterprise V 8.0.1

Yes, I have analyzed with the branch. 

Plugin name is - Sonar 4stash V 4.11- applied on Bitbucket v 6.10

It should be analyze automatically right with that plugin. 

We have a option to pass the parameters PR Id and branch name, it will give. Those results should show on BB PR request dashboard. 

Thank you!! 

Michael Rüegg _Mibex Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2020

Please notice that the app will not analyze a branch automatically, but instead, it relies on your CI/CD pipeline to execute an analysis for these branches with -Dsonar.branch.name.

Would it be possible for you to create a support request at https://support.mibexsoftware.com so that we can exchange screenshots / logs?

muheeb_shaik February 11, 2020

Sure, I will create and share you the details soon, Thank you. 

muheeb_shaik February 20, 2020

Hi Michael : could you please help about Active-active system of Bitbucket server edition installation and configuration on Linux please. Implementation steps or references. Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events