Full list of possible pull request decoration parameters

Hello,

  • SonarQube 8.9.1 and SonarScanner 4.6.2.2472

I am trying to run pull request decoration using Azure and Bamboo. Bamboo pulls the code for Azure and runs the scan. I however, receive the following warning in SonarQube

  1. The Azure DevOps Project name is missing in the SonarQube configuration. Please configure this parameter in the SonarQube Project ALM settings.
  2. The Azure DevOps Repository name is missing in the SonarQube configuration. Please configure this parameter in the SonarQube Project ALM settings.

The ALM configuration is valid. I want to achieve this without manually importing the specific project into SonarQube.

I tried passing the following into sonar-project.properties

sonar.pullrequest.provider=vsts
sonar.pullrequest.vsts.project=<project-name>
sonar.pullrequest.vsts.instanceUrl=https://dev.azure.com/<organization>
sonar.pullrequest.vsts.repository=<repository>

But I still receive the warnings. PR Decoration however, does successfully occur. There is no mention in the 8.9 documentation about the vsts parameters that may be available Pull Request Analysis | SonarQube Docs but in the 7.4 documentation it is documented that there are pr decoration parameters for github and svn Pull Request Analysis.

Is there documentation for these parameters for Azure?

Kind Regards,
Ian

Hi Ian,

I’m a little confused by this:

Surely you’re not trying to decorate your PRs without actually analyzing the project in SonarQube? That’s just not going to work.

And here’s a list of analysis parameters.. It’s not an exhaustive list of all the parameters you could use. But it should be what you need.

 
Ann

Sorry for the confusion. I meant I don’t want to manually import them into SonarQube. I will run the analysis from Bamboo but Sonar needs all of the details of where to send the results and which PR to decorate. This is the part I was not sure about. Importing a project manually and then running the analysis provides SonarQube with some parameters that allow it to send the results. These parameters are not documented.

Hi,

SonarQube will automatically create a project on first analysis, but it’s not going to know anything at that point about where to go to decorate PRs, or even that it should. Since you want PR decoration, your best bet is to use the DevOps platform integrations to import your projects into SonarQube. There are tutorials that will then walk you through getting the right CI/CD setup.

 
Ann

I am replying to this thread because I have a similar situation but with GitHub. As we continue adding more projects, I discover that I am forced into manual intervention in every case. Initial analysis of a new project fails PR decoration because the repository settings are missing. I have been hoping that these parameters would be available for setting (if not discoverable) but sadly disappointed.

Hi @Jaff,

Did you use the integration to import those projects or let them be created on first analysis?

 
Ann

I let them be created on first analysis. What integration is available for GitHub?

Hi,

The docs should help.

 
Ann