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?