Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Regarding Sonar Add on bitbucket cloud

Supriya June 1, 2016

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

2 votes
Answer accepted
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2016

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

Supriya June 2, 2016

Hi Erik,

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

evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2016

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).

Supriya June 2, 2016

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

Supriya June 2, 2016

I tried doing that too. It says 

" Add-on Sonar for Bitbucket is not responding. Wait or cancel? " 
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2016

Yeah, it's broken.

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.
June 3, 2016

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

 

evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 3, 2016

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.

Supriya June 5, 2016

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

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.
June 6, 2016

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

Supriya June 6, 2016

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

 

 

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.
June 6, 2016

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?

Supriya June 6, 2016

Hi Michael,

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

What do you mean by public sonar instance? 

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.
June 6, 2016

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.

Supriya June 7, 2016

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

Supriya June 7, 2016

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

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.
June 7, 2016

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

Patria Lukman April 28, 2017

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

 

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.
April 28, 2017

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

Christopher Bartolo November 15, 2017

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
TAGS
AUG Leaders

Atlassian Community Events