Facing a Problem in Implementing SonarCloud Scan for bitbucket repo using Jenkins

Facing a Problem in Implementing SonarCloud Scan for bitbucket repo using Jenkins
Hi,
I need to create a working Jenkins job that will scan the Bitbucket repo (all branches) upon pull request creation. Automatic scans should run on all branches upon pull request creation.

Below are the steps I have followed:

    • installed the “Execute Sonarqube scanner” plugin in Jenkins.
    • Updated the Analysis properties as below:
  • sonar.organization=xxxx
  • sonar.projectName=xxxx
  • sonar.projectKey=xxxx
  • sonar.pullrequest.base=master
  • sonar.java.binaries=generators/classes
  • sonar.pullrequest.key=$BUILD_NUMBER
  • sonar.pullrequest.branch=$GIT_BRANCH
  • sonar.projectVersion:1.0
  • sonar.pullrequest.provider=BitBucket
  • sonar.sources: xxxxx
  • sonar.login: xxxxx

When I trigger a Job gets fails in Jenkins and the code is also not scanning on Sonarcloud Dashboard. I’m I missing any of the step on this ?
Could anyone please help me to resolve this issue?

Hello @srikant ,

Welcome to the community!

Could you provide the logs of the failing job? If you don’t want to post them publicly you can also send me a private message.

Hello Martin,
Below I’m sharing you the error I’m facing…

From the error message it seems that the account you are using to run the analysis (via the sonar.login parameter) does not have enough permissions. Could you check that you have the “Execute Analysis” permission for that user?

Hello Bednorz,
I have a “Execute Analysis” permission. My Bad Previously I missed to update the sonar.login token. After updating those details I get a error as below.