The documentation for the azure devops yaml integration is very scant.
One of the examples includes:
But I cannot find a complete list of what input parameters can be used.
In our pipelines we have:
The sonar extra properties map to the -D options we would specify on the command line but what for example is “cliSources” ?
I would like to see at least a table of the available options for example.
For context. Here is a current problem I am having.
The paths in foobar/coverageSonar.xml assume the analysis is being run with foobar as the working directory. For bash tasks I can set the working directory as:
- task: Bash@3
displayName: Do something with coverage
Is there an equivalent for the sonarCloudPrepare task?
Currently I have to alter the paths in the coverage report to be relative to the source root rather than foobar or sonar will ignore them but perhaps I can just change the working directory instead somehow?
A similar request is Documentation Update - Azure DevOps Integration
Hi @KantarBruceAdams, apologies for the late answer!
You can set the property
sonar.working.directory in the
extraProperties section of your configuration, this should achieve your goal.
The cliSources property is to set the location of the source code you want the scanner to analyse (the same as the sonar.sources) property.
I agree that the properties of the SonarCloudPrepare task are not documented enough, it would deserve a separate section in our documentation (https://docs.sonarcloud.io/). I’ll pass the feedback to our internal documentation team and we’ll improve the documentation.
Hi @KantarBruceAdams, I made a Documentation ticket to describe the SonarCloudPrepare task, and we’ve got it in our backlog.
Thanks for bringing this to our attention!
Any update or link to progress on this?
Hi @Arni, Sorry, the Docs tickets are not public (although we have discussed making them public).
The ticket is still in our backlog; I added a comment in the ticket to reply to this thread when it is complete.
No promises when we can publish, but I am working on improving the SonarCloud-Azure setup documentation now, and it seems natural for me to pick this up in parallel.
Hi, has the documentation already been published?
I’m looking for a reference to the azure pipelines tasks mentioned here (SonarCloudPrepare@1, SonarCloudAnalyze@1, …).
I’m expecting a clear API reference, e.g.
Where can I find it?
@gianfaProm , @Arni , we published the SonarCloudPrepare task properties today.
See the section on Using the Prepare Analysis Configuration task, from the docs page on the SonarCloud Extension for Azure DevOps.
Any feedback you have will be helpful.
For those interested in how the Prepare analysis configuration task relates to SonarQube: we will soon start the process to confirm and adapt the property descriptions for the SQ Documentation.