SonarQube plugin for Bitbucket does not immediately show the SonarQube issues inline with the code after the scan for the pull request is completed and you have to manually force the plugin to get the issues displayed by selecting the "Refresh Sonar analysis" option in bitbucket.
Hi,
The app will automatically add issue information to your pull requests when it gets informed by SonarQube about new analysis results through webhooks.
If that doesn't happen, and you need to manually refresh it, then something with the webhook configuration is wrong.
Could you please check if you see a working webhook under SonarQube admin -> general -> webhooks?
Thanks,
Michael (app vendor)
Hey Michael Thanks for response. Can you tell me where do I need to check this thing working webhook under SonarQube admin -> general -> webhooks?
In Sonarqube or in bitbucket do I need to check?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're very welcome. In SonarQube.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes that i understood In Sonarqube i need to check but in "Administration" I need to go and then general and then webhooks or else you want to convey.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael Yes I found the web hook configuration in sonarqube but wondering how to check whether it's working properly or not. Can you suggest this thing.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you see an entry in the web hook list with an URL targeting your Bitbucket Server instance?
Is there a green tick under the column "Last delivery"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes i see the Url but it's not green tick that means something wrong with webhook configuration. How can I correct this thing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What error do you get? You see the error details by clicking on the right icon?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Getting this message
Response: Server Unreachable
Duration: 7ms
Payload:
{
"serverUrl": "http://sonarqube.sunlifecorp.com:9000",
"taskId": "AXRxuLlEE_lwDT5vH3oN",
"status": "SUCCESS",
"analysedAt": "2020-09-09T07:14:49+0000",
"revision": "976613025056c8e4c4105daf14ca2579c31fdbd4",
"changedAt": "2020-09-09T07:14:49+0000",
"project": {
"key": "ca.sunlife.ind.web:ind-web-policy-lumarketindex",
"name": "ca.sunlife.ind.web.ind-web-policy-lumarketindex",
"url": "http://sonarqube.sunlifecorp.com:9000/dashboard?id=ca.sunlife.ind.web%3Aind-web-policy-lumarketindex"
},
"branch": {
"name": "develop",
"type": "BRANCH",
"isMain": true,
"url": "http://sonarqube.sunlifecorp.com:9000/dashboard?id=ca.sunlife.ind.web%3Aind-web-policy-lumarketindex"
},
"qualityGate": {
"name": "SLF Quality Gate - 90%",
"status": "ERROR",
"conditions": [
{
"metric": "new_security_rating",
"operator": "GREATER_THAN",
"value": "1",
"status": "OK",
"errorThreshold": "1"
},
{
"metric": "new_coverage",
"operator": "LESS_THAN",
"value": "88.53159433325838",
"status": "ERROR",
"errorThreshold": "90"
},
{
"metric": "new_blocker_violations",
"operator": "GREATER_THAN",
"value": "0",
"status": "OK",
"errorThreshold": "0"
},
{
"metric": "new_vulnerabilities",
"operator": "GREATER_THAN",
"value": "0",
"status": "OK",
"errorThreshold": "0"
}
]
},
"properties": {}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Regarding " Server Unreachable": Is it possible that due to network/firewall settings, SonarQube cannot access Bitbucket Server?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Michael Thanks for replying.
But I am not sure about this thing that when server is Unreachable what need to do. That's why I raised a question here just to get the solution of the behavior of this particular "Sonar for bit bucket" plugin. Why it's not working.
As from atlassian community they already told this thing that this plugin is a third-party supported for which vendor Is "Mibex". So they told that you need to check with the vendor of Mibex team for this issue.
And I think If I am not mistaken then Michael you are from "Mibex Team" who is looking into this issue.
So, Please suggest the ways to tackle the problem. I have already send you the error message completely and screenshots as well so that you will better understand them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're very welcome. The web hook configuration looks OK. But SonarQube could not reach Bitbucket Server when executing the web hook. That could have various (internal network) reasons. I would suggest that you try to ping Bitbucket from SonarQube to see if your network configuration allows it. Please let me know if this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay But Michael how can i ping from Sonarqube Server.
As the reports generation and code analysis process is going on from bitbucket to sonarqube. Our Users are doing this thing with no issues. I think if this task is work then possibly the server is reachable from sonarqube to bitbucket.
Or is there any other way if you suggest so that I can check this point?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And one more thing I wanted to confirm from you that I was reading "Sonar for bit bucket server plugin" document and found that editions mentioned are only 2(community and commercial edition) What it means Is this plugin will not be applicable/working in Bit bucket if we have "Enterprise Edition Of Sonarqube running".(See attachment for this).
So, FYI currently we are using Sonarqube version 8.2 of Enterprise Edition.
I am reading this document from below link:-
https://mibexsoftware.atlassian.net/wiki/spaces/MSS/pages/162398304/How+to+setup+Sonar+for+Bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would get into contact with your network team to see if a connection between SonarQube -> Bitbucket is possible.
Commercial editions means both "Developer" and "Enterprise" edition. So that will work.
Hope that helps. Otherwise, please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay Thanks Michael for confirmation.
Please keep me updated regarding the network team connect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also Michael I thing i found something missing in my bitbucket server in repository settings(See attachments).
But when I am reading this document from below link:-
Then here, a different option is coming in step no.-8 of above link which is "use new branching feature" option is coming in above link but in my bitbucket server in repo settings this option is not coming.(see attachments).
May be this is something we need to check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would it be possible for you to create a support ticket at https://support.mibexsoftware.com ? That will help us to better support you so that we can exchange log files etc.
Please reference this community article when you submit a support request. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Michael I have created the support request over the above link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.