Sonar Include Code Quality for Bitbucket receives the analysis results from SonarQube SonarQube™ via Webhook.
Options for Webhook setup
Automatic setup (recommended):
For SonarQube SonarQube™ 7.8 or newer
Required for SonarQube SonarQube™ 7.7 or older
Or to use BasicAuth or manually configured secret
Manual webhook setup
To manually configure the webhook, enable "manual webhook configuration" in the SonarQube SonarQube™ server settings. For the manual webhook you have two options:
either you configure a manual webhook with
the name ch.mibex.bitbucket.sonar,
the URL http://bitbucketserver/rest/sonar4stash/1.0/webhook/secret
a secret in SonarQube SonarQube™ that must match the one in the server configuration:
...
or you use basic auth with a Bitbucket user with
the webhook name ch.mibex.bitbucket.sonar
an URL like https://user:userPassword@bitbucketserver/rest/sonar4stash/1.0/webhook/basic_auth
Replace user:userPassword with credentials of a Bitbucket user with READ permissions for the repos you want to analyze.
leave the secret empty.
...
Info |
---|
For SonarQube SonarQube™ 7.7, please make sure to pass -Dsonar.analysis.scmRevision=COMMIT_ID to your SonarQube SonarQube™ analysis. For newer SonarQube SonarQube™ versions, this is not necessary anymore. |