SonarQube 8.2 decorative PR Bitbucket Server 6.2

I am using SonarQube 8.2 and Bitbucket Server 6.2
I want to have decorative PR show in Bitbucket for a SonarQube project
So far I have tried:

  • In SonarQube I have configured the Bitbucket Server credentials with a token with admin access.
  • In the SonarQube project I have populated the Bitbucket project Key and Slug.
  • I have created a branch make changes that break a rule and raise a PR.
  • no decorative PR is visible. No entry in the Compute Engine logs or Main Process.

What am I missing to get Bitbucket to trigger a SonarScan - do I need to setup a Bitbucket webhook to SonarQube?

The SonarQube user guide is not clear on this as it states which I have completed:

Projects created manually

If you create a new project Manually or want to add Pull Request decoration to an existing project, you need to set your project settings at Project Settings > General Settings > Pull Request Decoration . Here you’ll select your Configuration name and set your Project Key and Repo Slug .

Hi @Rob_Duncan,

You need to launch an analysis from a CI, what CI do you use?
You may find some information here.

If you already launch your analysis with a CI, do you see the PR in SonarQube ? if yes, do you see a warning at the top right of the PR in SQ ?

Cheers

@aurelie, so that does confirm my suspicions that I still need to use a CI. We are using Jenkins. We have hundreds of repos so I will need to have a jenkinsfile for each repo to get he code scanned.
I am exploring a single master job that will scan all repos one by one and scan them but it is tricky having to determine .NET Core vs .NET Framework vs Python etc so we may just have to wait for each team to adopt Jenkins pipelines.

I am still working on the Decorative PR - even after setting up the SonarQube project and then raising a PR in Bitbucket we are not seeing a decorative PR.