Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread David Karr
You would have to look at what directory you're running the scan from, what your "sonar.sources" property is set to, and what your project structure looks like. Getting correct coverage data is certainly important, but you won't be able to get coverage data if you haven't found any source files.

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread Geoffroy J
I would have a look here: 00:00:03.846 11:26:43.035 INFO: Indexing files... 00:00:03.846 11:26:43.035 INFO: Project configuration: 00:00:03.846 11:26:43.039 INFO: 0 files indexed Seems it is not finding any file to analyse... On Thu, 12 Nov 2020 at 11:47, Richard Bywater wrote: > I think

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread Richard Bywater
I think you've been chasing the wrong issue. The lack of a project root configuration file is normal if everything is configured elsewhere. As far as I can tell you are having issues with no code coverage? >00:10:46.807 INFO: Sensor JaCoCo XML Report Importer [jacoco] >00:10:46.807 INFO:

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread jesus fernandez
This is the huge log I get with -X parameter: 00:00:00.913 Injecting SonarQube environment variables using the configuration: SonarQube2 [Pipeline] { [Pipeline] bat 00:00:01.203 00:00:01.203

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread jesus fernandez
Thanks both for answering, David I have tried both with "-D" with and without spaces. Geoffroy I was running a 8++ version I just downloaded 7.9 but still the same. One question which might be silly (I had used SonarQuebe ever before) does the pipeline needs to pull from a SCM for sonarqube to

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread Jesus Fernandez
Thanks both for answering, David I have tried both with "-D" with and without spaces. Geoffroy I was running a 8++ version I just downloaded 7.9 but still the same. One question which might be silly (I had used SonarQuebe ever before) does the pipeline needs to pull from a SCM for sonarqube to

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread Geoffroy J
Hello i would recommend to remove extra-spaces for "-D" options, this is incorrect syntax, and also enable debug mode (-X). As you are providing information using the scanner option, maybe it is normal to see "Project root configuration file: NONE " log. Maybe setting sonar.projectBaseDir option

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-11 Thread David Karr
I have never seen the "-D" command-line option used with a space between the option and the provided value, and the documentation never shows that example. On Wed, Nov 11, 2020 at 1:13 PM jesus fernandez < jesusfernandez0...@gmail.com> wrote: > and this is the log: > ``` > *00:00:00.901*

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-11 Thread jesus fernandez
and this is the log: ``` *00:00:00.901* Injecting SonarQube environment variables using the configuration: SonarQube2 [Pipeline] { [Pipeline] bat *00:00:01.175* *00:00:01.175*

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-11 Thread jesus fernandez
Thanks Geofrroy for your answer, I had posted the question in the sonarsource community with no answer already. I am using the free version with the C++ plugin which works fine in many tutorials and videos you can find online. This is my pipeline: ``` pipeline { agent any

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-11 Thread geoffroy...@gmail.com
Hello you should probably ask here: https://community.sonarsource.com/ Are you using the paid version of SonarQube, to get C/C++ analysis feature? Also, from experience, before running any new tool analysis from Jenkins, it is better to first run (and debug) it locally. Sonar scanner local

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-11 Thread jesus fernandez
Hi David, Thanks for your answer but I get the same result when adding the parameters with -D I get the "*00:00:01.529* *INFO: Project root configuration file: NONE" *message at the beginning of the log. I have tried to create the helloworld simplest c++ project just to test, but I get the

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-10 Thread David Karr
I believe that the mistake that most people make with running the sonarqube scan from a CI build is TRYING to define a sonarqube properties file. It's best to simply provide all of the required options on the sonar-scanner command line, using "-D". On Tue, Nov 10, 2020 at 3:44 AM jesus fernandez