We already have Plugins installed for bitbucket server and sonarqube in jenkins
and We ran the sonar using this command in the Jenkinsfile
agent {
docker {
image ‘my-artifactory-url.com/sonarsource/sonar-scanner-cli:4’
reuseNode true
}
}
steps {
sh “/usr/bin/entrypoint.sh sonar-scanner -Dsonar.login=‘<tokenid>’ -Dsonar.language=js -Dsonar.projectKey=<project-key> -Dsonar.sources=test -Dsonar.profile=node -Dsonar.host.url=https://<url> -Dsonar.branch.name=<git-branch-name>”
}
Must-share information (formatted with Markdown):
-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube 8.8 -
what are you trying to achieve
Blocking Pull Request merges -
what have you tried so far to achieve this
I added the key com.sonarsource.sonarqube in the bitbucket repo > pull requests > code insights but I am getting the error
There is 1 issue preventing you from merging this pull request.
- Report with key ‘com.sonarsource.sonarqube’ has not yet been created
Link: https://docs.sonarqube.org/8.5/analysis/pr-decoration/