Sonar badge and Analysis of each pulrequest

Hi Team

We have successfully installed sonar and analyzed both master and PR branches but we want some additional features as like codecov tool which was mentioned in the below screenshots. Can you please help us how to achieve this through sonar?

1)Bitbucket Badge integration with sonar?any plugins do we need to install on bitbucket side or sonar side to display successful message icon on bitbucket home repositoy.Please find attached scrrenshot for your reference.

image

2)Analysis of each PR like attached screenshot?(codecov example)

Thanks,
Revanth

@dob_support @ @Community_ColorOS_ID
Any help on this topic please?

Thanks,
Revanth

Hi,

I think you’ve come to the wrong place to ask about Codecov. As far as I know, there’s no integration. But you should really ask Codecov how to get a Codecov report & badge.

 
Ann

Hi @ganncamp @dob_support @ @Community_ColorOS_ID ,
sorry if my question not understandable,actully my question was i need to do similar set up in sonarqube server as like we did in code cove.Please let us know is there any documentation to refer or share me how to to this set up. My main intention is i need to see both badges and sonar coverage(as mentioned in the pics but that is ralated image

image to code cov) in bitbucket only.
Thanks,
Revanth

Hi Revanth,

So if you’re just looking for the badge that indicates overall coverage, that’s readily available from the Project Info pane on public projects:

Note that that option simply isn’t available for private projects.

 
HTH,
Ann

Thanks @ganncamp .Is there a way to see sonar coverage report in bitbucket itslef instead of login to sonar server ?do we have any webhooks or some other configuration to achieve this?

Also ragarding badge,quality gate status is showing as shown in the attached status.it it seems UI has some problem or need to install some plugins to display icon properly on bitbucket UI Qualitygatestatus .Can you please help on this as well?

CC: @dob_support @Community_ColorOS_ID

Thanks,
Revanth

Hi Revanth,

Please stop pinging users who aren’t active in your thread.

Regarding the missing badges, is your project public or private? What http code do you get when you try a direct fetch of the images?

 
Ann

sure @ganncamp .its Private bitbucket repository.actually this is trail dev edition license one which we got from sonar team.i used below mardown one on bitbucket repo side [README.md].when we directly access the url we are getting it right image but its not showing proper image in the bitbucket UI.
Also i request you to please let me know is there anyway to achieve this if it is private.

Quality Gate Status

Thanks,
Revanth

Hi Revanth,

As I said earlier, badges simply don’t work for private projects. Look in your Project Information to know:
Selection_999(469)

 
Ann

Thanks @ganncamp .just want to check Is there anyway to display badge image for private projects?
Thanks,
Revanth

Revanth,

Not sure how I can make it any clearer.

 
Ann

Hi @ganncamp i understood that for a private projects badge will not support but my question was i have a project which is public and i also get the makrdown url for that project(screenshot given below) and when iam adding this to my bitbucket README.md file it is not showing the numbers properly on the bitbucket UI.I have attached the screenshots for your reference.

in my screenshot if you see the codecov markdown url is displaying the numbers properly where as sonarqube markdown is not displayed properly.

i just want to understand if we are missing any set up or configuration here and is there anything we need to do from our bitbucket side to display this markdown links properly .Also we tried to check this UI on different browsers like chrome,suffari and IE.

Thanks,
Revanth

Qualitygatestatus

Hi,

Okay! So then back to this question: when you put the image URL in your browser’s location bar, what happens?

 
Ann

Hi @ganncamp,

I’m Pravas, Revant’s colleague. So when we put the image URL in the browser, it gives the proper image.

Attached screenshot for your reference.

Thanks,
Pravas.

Hi,

Anything interesting in your browser console when you pull up the page where the images don’t render? What’s the HTTP code on that?

 
Ann

Hi @ganncamp,

There is nothing wired in the browser, as you can see in the above image, we are able to get the proper image for codecov markdown URL.
We just added the sonarQube markdown URL to our README.md file in the bitbucket repo

Quality Gate Status (screenshot attached)

We also tried adding the project key i.e : com-manh-cp:ai-inventory instead of “com-manh-cp%3Aai-inventory” in the markdown URL, but still the same issue.

Please let us know if there is anything we can do about this.

Regards,
Pravas.

Hi Pravas,

Since the badge shows up just fine when you call it directly, I’m not sure what to tell you. This is going to be about your environment, I guess.

 
Ann

Hi Ann,

Is there anything you can guide us to change in the environment to display it correctly ?

Actually we are planning to change from codecov to sonarQube developer edition and from last couple of weeks we are doing some POC on the trial version. And already the team is familiar with the codecov badges and its used in bitbucket and as well as in some confluence pages to track the code coverage for our components.

It will be great, if you have some alternative to achieve this.

On a separate note is there anything available for pull request analysis in sonarQube? and can we check it in the trial license? if so can you point us any document to configure it and check the feature.

Thanks in advance,
Pravas.

Hi @ganncamp,

Is there anything you can guide us to change in the environment to display it correctly ?

Actually we are planning to change from codecov to sonarQube developer edition and from last couple of weeks we are doing some POC on the trial version. And already the team is familiar with the codecov badges and its used in bitbucket and as well as in some confluence pages to track the code coverage for our components.

It will be great, if you have some alternative to achieve this.

On a separate note is there anything available for pull request analysis in sonarQube? and can we check it in the trial license? if so can you point us any document to configure it and check the feature.

Thanks in advance,
Pravas.

9 posts were split to a new topic: PR decoration in Bitbucket Cloud missing