PullRequest Decoration

Hi,

We are using the newest SonarQube Developer Edition Version 8.1 (build 31237). We used to have PR decoration working with earlier versions. We are using a selfhosted Azure Devops Server. Now it does not decorate our PR anymore.

I did: Set access token in global settings and select the configuration in the project, however, it keeps saying Configuration is not complete. I am not sure which configuration it is referring to?

2020.02.03 08:11:14 DEBUG ce[AXAJ4x-KsdjpaZzMUiXA][c.s.C.D.C.C] Configuration is not complete, unable to compute Azure DevOps PR URL
2020.02.03 08:11:14 INFO ce[AXAJ4x-KsdjpaZzMUiXA][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=16ms
2020.02.03 08:11:16 INFO ce[AXAJ4x-KsdjpaZzMUiXA][o.s.c.t.CeWorkerImpl] Executed task | project=abc| type=REPORT | pullRequest=511 | id=AXAJ4x-KsdjpaZzMUiXA | submitter=admin | status=SUCCESS | time=30941ms

Thanks!

Hi @cbcelca,

Are you using the Azure DevOps extension inside your build pipeline ?

Mickaƫl

Hi Mickaƫl

Thank you. Since we analyze C++ we cannot use the Azure DevOps extension. We call the build-wrapper manually. Maybe this has changed now and is required?

Thanks

Thanks.

You can use the Azure DevOps extension for that matter too, this will ensure that all the properties needed (especially for PR decoration) are filled before it invokes the scanner CLI using the Run Code Analysis task.

If you wish to stay like that, ensure that the following properties are set in the SONARQUBE_SCANNER_PARAMS environment variable.

sonar.pullrequest.key
sonar.pullrequest.base
sonar.pullrequest.branch
sonar.pullrequest.provider (TfsGit, GitHub, Bitbucket)

And depending on the repository where you code is hosted :
For Azure DevOps :

sonar.pullrequest.vsts.instanceUrl
sonar.pullrequest.vsts.project
sonar.pullrequest.vsts.repository

For GitHub :

sonar.pullrequest.github.repository

HTH,
Mickaƫl

2 Likes

Thank you very much for this. I was wondering where you found this? I wasnā€™t able to find this information in the documentation.