After analysis is done results are sent to SonarQube instance where compute engine prepares data and then Quality Gate can change status or not depending on settings and analysis.
What exactly do you mean by set the sonar project quality-gate at the time of sending the data? Could you explain more your use case?
Also to which earlier option you are referring to?
Consider this is the first time the project is ingested into sonar so that way wanted to understand if there was a possibility to set it using the CLI rather than admin intervention.
So the case is that project ownership is mine but sonar administration is by other admin level agents.
So is intervention required by administrator to manually set for each project within dashboard to the quality profile or can it be done through cli while sending to sonar.
Hopefully it is clearer now, I can elaborate further
To sum up, we don’t provide such property to either set or change Quality Gate in scanner-cli during scan as I’ve mention earlier.
In order to configure Quality Gate for your project, you would have to get at least project administrator permission and do it by UI.
Also when project has been analysed for the first time, a default Quality Gate configured in your SonarQube instance will be set.
For more information regarding Quality Gates see docs.
Also if you feel if that would be a nice feature, I encourage you to suggest it here.
Hi!,
I have a similar need, and I’m checking since it’s been a while from this original post.
Is it possible to modify the code coverage threshold when running sonar-scanner cli when using the community edition?
We are in the early stages of adding tests to one of our existing projects, so our code coverage is around 20%. My intention is to set a low cc threshold to 20% and continue to increase the % when adding more tests.
This needs to be to specific project, other projects are running fine with a higher cc.