Regarding Sonar Add on bitbucket cloud

Hi,

I have referred https://marketplace.atlassian.com/plugins/ch.mibex.bitbucket.sonar/cloud/overview for this sonar add on.

Installation was successfull.

But when i do so, i am not able to see the update in the overview page. It says "loading sonar for bitbucket" but nothing is shown up

I wanted to know what i can do for it?

Then they have mentioned to add sonar.json file in the root folder of the master branch .What does that mean? We have to add it to the local repository or directly in the Bitbucket page?

1 answer

1 accepted

1 vote

This looks like a bug in the add-on. I've notified the vendor.

Hi Erik,

Thankyou. But what is that sonar.json file about? where should i add that?? i have a doubt regarding it too.

That is explained in their documentation: https://mibexsoftware.atlassian.net/wiki/display/SONAR4BB/Installation

"This add-on needs a configuration file called "sonar.json" in the root folder of the master branch of the Bitbucket repository that should get analyzed."

You can use the "New file" button on the source browser to create that file (or just push it up).

Ok. So i should create that file in the master!

I tried doing that too. It says 

" Add-on Sonar for Bitbucket is not responding. Wait or cancel? " 

Yeah, it's broken.

Hi,

The problem is that we cannot show an error when no sonar.json file is provided because a user might not want every repository being analyzed by our add-on. The activation of the add-on for a repository is therefore handled by adding a sonar.json file to a repository. We will nevertheless show a small help icon for the next release of the add-on that makes users aware of why no statistics are shown due to the missing sonar.json file.

Now that you have added a sonar.json file to your repository, do you still get a "not responding" error? Could you please try again? I'll then try to have a look at the application log to see what is causing these issues.

Best regards,

Michael

 

When the file is not (yet) present, it might be beneficial to not make a broken AJAX call, breaking the add-on panel, but anticipate it and display an appropriate message.

Hi 

I tried again. Its not showing up .Can anyone help me in resolving it.

As mentioned i have added sonar.json file in the root of the master file.

Capture11.PNG

Hi,

We've just released a new version of the add-on fixing the issue with the broken AJAX call when no config file exists in the repository. Could you please try again? I haven't seen any errors in the logs so far for your attempts.

Thanks,

Michael

Hi Michael,

I tested it again. The same error is shown again.

The steps i followed are:

  1. Created a repo with a source file (java code)
  2. Same repo that is the project is imported to sonarqube
  3. sonar add on was added in Bitbucket 
  4. Added file sonar.json in the root of the master folder by clicking "New file" when clicking source
  5. In the sonar.json file, I added the sonar instance that is "http://localhost:8080//" in my case and sonar project key as mentioned in sonar.project.properties
  6. Clicked overview tab in the Bitbucket

Same error is shown:

First it says "Loading sonar add on" then "Add-on Sonar for Bitbucket is not responding. Wait or cancel?"

 

 

Hi Supriya,

Please note that you cannot use http://localhost:8080 as your Sonar instance. The plug-in only works with public Sonar instances that are reachable from the Internet. Do you have a public Sonar instance which analyzes your projects?

Hi Michael,

I am using a local sonar instance that is ip:8080.

What do you mean by public sonar instance? 

Hi Supriya,

Our add-on runs in the cloud. Therefore, your Sonar instance must be accessible from the internet. You cannot use a an instance that runs locally on your machine or behind a firewall.

Ok. So how can i start such an instance? i dint find any option or downlaod version for it!

It should be available in nemo sonarqube "https://nemo.sonarqube.org/" ?

Nemo would be one option. Or Cloudbees offers SonarQube for the cloud. In order to get your project analyzed with Nemo, you have to follow the instructions provided here: https://nemo.sonarqube.org/?did=157

hi Michael, I submitted a ticket to your jira help desk. 

anyways, here is my configuration:

 

I'm getting an error when integrating with your plugin, as shown in the below picture.  Could you tell me why?

 

 

Screen Shot 2017-04-28 at 11.55.36 AM.png

 

Hi,

Are you using SonarQube 6.3 already? Please note that the add-on currently doesn't support the latest SonarQube version. We are working on this now and I'll reply here once it is ready.

Best regards,

Michael

Hi,

as sonarqube is now on 6.6, has the plugin been updated to support it? I am getting this same error.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked 11m ago in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

3 views 0 1
View question

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you