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 <
jesusfernandez0...@gmail.com> wrote:

> I am trying to learn the basics of sonarqube, I have set it up on my
> jenkins pipeline (which uses MSBuild to compile the project) and the set a
> step to execute SonarQube but after reading and watching a few tutorials
> and the documentation itself I think I got a bit lost as when my pipeline
> finishes executing I go to my SonarQube server and I my project says ```The
> main branch has no lines of code.```. I get the following log when running
> the sonarqube step on my jenkins:
> ```
> 00:10:43.369  Injecting SonarQube environment variables using the
> configuration: SonarQube
> [Pipeline] {
> [Pipeline] bat
> 00:10:43.653
> 00:10:43.653
> C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\sonar-scanner.bat
>
> 00:10:43.653  INFO: Scanner configuration file:
> C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
> 00:10:43.653  INFO: Project root configuration file: NONE
> 00:10:43.653  INFO: SonarScanner 4.4.0.2170
> 00:10:43.653  INFO: Java 1.8.0_261 Oracle Corporation (64-bit)
> 00:10:43.653  INFO: Windows 10 10.0 amd64
> 00:10:44.230  INFO: User cache:
> C:\WINDOWS\system32\config\systemprofile\.sonar\cache
> 00:10:44.230  INFO: Scanner configuration file:
> C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
> 00:10:44.230  INFO: Project root configuration file: NONE
> 00:10:44.230  INFO: Analyzing on SonarQube server 8.5.1
> 00:10:44.230  INFO: Default locale: "es_ES", source code encoding: "UTF-8"
> 00:10:44.783  WARN: SonarScanner will require Java 11 to run starting in
> SonarQube 8.x
> 00:10:44.784  INFO: Load global settings
> 00:10:44.784  INFO: Load global settings (done) | time=40ms
> 00:10:44.784  INFO: Server id: BF41A1F2-AXWnoupqHjnRwWgEnmvK
> 00:10:44.784  INFO: User cache:
> C:\WINDOWS\system32\config\systemprofile\.sonar\cache
> 00:10:44.784  INFO: Load/download plugins
> 00:10:44.784  INFO: Load plugins index
> 00:10:44.784  INFO: Load plugins index (done) | time=26ms
> 00:10:44.784  INFO: Load/download plugins (done) | time=48ms
> 00:10:45.037  INFO: Process project properties
> 00:10:45.037  INFO: Process project properties (done) | time=6ms
> 00:10:45.037  INFO: Execute project builders
> 00:10:45.037  INFO: Execute project builders (done) | time=1ms
> 00:10:45.037  INFO: Project key: Boston
> 00:10:45.037  INFO: Base dir: C:\Users\anton\.jenkins\workspace\Boston
> 00:10:45.037  INFO: Working dir:
> C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
> 00:10:45.301  INFO: Load project settings for component key: 'Boston'
> 00:10:45.301  INFO: Load project settings for component key: 'Boston'
> (done) | time=10ms
> 00:10:45.301  INFO: Load quality profiles
> 00:10:45.301  INFO: Load quality profiles (done) | time=27ms
> 00:10:45.301  INFO: Auto-configuring with CI 'Jenkins'
> 00:10:45.301  INFO: Load active rules
> 00:10:46.241  INFO: Load active rules (done) | time=787ms
> 00:10:46.241  INFO: Indexing files...
> 00:10:46.241  INFO: Project configuration:
> 00:10:46.241  INFO: 0 files indexed
> 00:10:46.241  INFO: - Run sensors on module Boston
> 00:10:46.241  INFO: Load metrics repository
> 00:10:46.241  INFO: Load metrics repository (done) | time=12ms
> 00:10:46.807  INFO: Sensor CSS Rules [cssfamily]
> 00:10:46.807  INFO: No CSS, PHP, HTML or VueJS files are found in the
> project. CSS analysis is skipped.
> 00:10:46.807  INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
> 00:10:46.807  INFO: Sensor JaCoCo XML Report Importer [jacoco]
> 00:10:46.807  INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined.
> Using default locations:
> target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
> 00:10:46.807  INFO: No report imported, no coverage information will be
> imported by JaCoCo XML Report Importer
> 00:10:46.807  INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) |
> time=1ms
> 00:10:46.807  INFO: Sensor C# Properties [csharp]
> 00:10:46.807  INFO: Sensor C# Properties [csharp] (done) | time=1ms
> 00:10:46.807  INFO: Sensor JavaXmlSensor [java]
> 00:10:46.807  INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
> 00:10:46.807  INFO: Sensor VB.NET Properties [vbnet]
> 00:10:46.807  INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
> 00:10:46.807  INFO: - Run sensors on project
> 00:10:46.807  INFO: Sensor Zero Coverage Sensor
>

Re: [REMINDER] - Jenkins 2020 elections. Voter registration deadline on Nov 08

2020-11-10 Thread Oleg Nenashev
Hello,

Thanks a lot to those who have already registered! Just a quick update,
after confirming the technical possibility we decided to extend the voter
registration deadline to Nov 24th. It gives Jenkins contributors more time
to register if they missed the Jenkins elections due to many other ongoing
events happening. You can still register for the elections by submitting this
Google Form  or sending an email to
jenkins-2020-electi...@googlegroups.com.

The registration deadline extension does not delay elections and does not
change the voting deadline (Nov 27). We have started sending the voting
links and the clarification/rejection emails to participants, and we will
keep incrementally doing it during the next 2 weeks. If you do not receive
a confirmation email within 2 working days after your registration, please
do not hesitate to contact the Jenkins 2020 Elections Committee.

Best regards,
Oleg Nenashev
Jenkins 2020 Elections Committee


On Sat, Nov 7, 2020 at 6:14 PM Oleg Nenashev  wrote:

> Dear all,
>
> November 08 (Sunday) is a deadline for voter registration in the Jenkins
> 2020 elections. W If you are a Jenkins contributor, please register for the
> elections here . We encourage all
> community members to support the candidates and to participate in the
> elections!
>
> Elected Jenkins officials represent the project and help initiatives to
> happen, and it is essential for the project's sustainability and for
> delivering major changes anticipated by users. Any community member is
> eligible to vote if there was a public contribution before Sep 01, 2020.
> Non-code contributions count as well: blog posts and video materials, issue
> reports, documentation, testing, reviews, etc. The registration will take
> just a few minutes.
>
> We will be electing 2 Governance Board members and a Jenkins Release
> officer. The rest of the officer positions are not contested. More
> information:
>
>- Full list of candidates and candidate statements
>
>- Jenkins Board and Officer Election Process
>
>- Jenkins Governance Board  and
>Officers 
>
> Best regards,
> Oleg Nenashev
> Jenkins 2020 Elections committee
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPfivLBiw%2BAjoCQoD2oO_ried%3D%2BbO9WPGas99R4gNdbeRK0MEA%40mail.gmail.com.


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

2020-11-10 Thread jesus fernandez
I am trying to learn the basics of sonarqube, I have set it up on my 
jenkins pipeline (which uses MSBuild to compile the project) and the set a 
step to execute SonarQube but after reading and watching a few tutorials 
and the documentation itself I think I got a bit lost as when my pipeline 
finishes executing I go to my SonarQube server and I my project says ```The 
main branch has no lines of code.```. I get the following log when running 
the sonarqube step on my jenkins:
```
00:10:43.369  Injecting SonarQube environment variables using the 
configuration: SonarQube
[Pipeline] {
[Pipeline] bat
00:10:43.653  
00:10:43.653  
C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\sonar-scanner.bat
  
 
00:10:43.653  INFO: Scanner configuration file: 
C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
00:10:43.653  INFO: Project root configuration file: NONE
00:10:43.653  INFO: SonarScanner 4.4.0.2170
00:10:43.653  INFO: Java 1.8.0_261 Oracle Corporation (64-bit)
00:10:43.653  INFO: Windows 10 10.0 amd64
00:10:44.230  INFO: User cache: 
C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:10:44.230  INFO: Scanner configuration file: 
C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
00:10:44.230  INFO: Project root configuration file: NONE
00:10:44.230  INFO: Analyzing on SonarQube server 8.5.1
00:10:44.230  INFO: Default locale: "es_ES", source code encoding: "UTF-8"
00:10:44.783  WARN: SonarScanner will require Java 11 to run starting in 
SonarQube 8.x
00:10:44.784  INFO: Load global settings
00:10:44.784  INFO: Load global settings (done) | time=40ms
00:10:44.784  INFO: Server id: BF41A1F2-AXWnoupqHjnRwWgEnmvK
00:10:44.784  INFO: User cache: 
C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:10:44.784  INFO: Load/download plugins
00:10:44.784  INFO: Load plugins index
00:10:44.784  INFO: Load plugins index (done) | time=26ms
00:10:44.784  INFO: Load/download plugins (done) | time=48ms
00:10:45.037  INFO: Process project properties
00:10:45.037  INFO: Process project properties (done) | time=6ms
00:10:45.037  INFO: Execute project builders
00:10:45.037  INFO: Execute project builders (done) | time=1ms
00:10:45.037  INFO: Project key: Boston
00:10:45.037  INFO: Base dir: C:\Users\anton\.jenkins\workspace\Boston
00:10:45.037  INFO: Working dir: 
C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
00:10:45.301  INFO: Load project settings for component key: 'Boston'
00:10:45.301  INFO: Load project settings for component key: 'Boston' 
(done) | time=10ms
00:10:45.301  INFO: Load quality profiles
00:10:45.301  INFO: Load quality profiles (done) | time=27ms
00:10:45.301  INFO: Auto-configuring with CI 'Jenkins'
00:10:45.301  INFO: Load active rules
00:10:46.241  INFO: Load active rules (done) | time=787ms
00:10:46.241  INFO: Indexing files...
00:10:46.241  INFO: Project configuration:
00:10:46.241  INFO: 0 files indexed
00:10:46.241  INFO: - Run sensors on module Boston
00:10:46.241  INFO: Load metrics repository
00:10:46.241  INFO: Load metrics repository (done) | time=12ms
00:10:46.807  INFO: Sensor CSS Rules [cssfamily]
00:10:46.807  INFO: No CSS, PHP, HTML or VueJS files are found in the 
project. CSS analysis is skipped.
00:10:46.807  INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
00:10:46.807  INFO: Sensor JaCoCo XML Report Importer [jacoco]
00:10:46.807  INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. 
Using default locations: 
target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
00:10:46.807  INFO: No report imported, no coverage information will be 
imported by JaCoCo XML Report Importer
00:10:46.807  INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | 
time=1ms
00:10:46.807  INFO: Sensor C# Properties [csharp]
00:10:46.807  INFO: Sensor C# Properties [csharp] (done) | time=1ms
00:10:46.807  INFO: Sensor JavaXmlSensor [java]
00:10:46.807  INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
00:10:46.807  INFO: Sensor VB.NET Properties [vbnet]
00:10:46.807  INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
00:10:46.807  INFO: - Run sensors on project
00:10:46.807  INFO: Sensor Zero Coverage Sensor
00:10:46.807  INFO: Sensor Zero Coverage Sensor (done) | time=0ms
00:10:46.807  INFO: SCM Publisher is disabled
00:10:46.807  INFO: CPD Executor Calculating CPD for 0 files
00:10:46.807  INFO: CPD Executor CPD calculation finished (done) | time=0ms
00:10:46.807  INFO: Analysis report generated in 48ms, dir size=82 KB
00:10:46.807  INFO: Analysis report compressed in 10ms, zip size=10 KB
00:10:47.060  INFO: Analysis report uploaded in 26ms
00:10:47.060  INFO: ANALYSIS SUC

Re: how to add a configuration parameter with spaces on Jenkins

2020-11-10 Thread jesus fernandez
that worked! thanks!

El viernes, 6 de noviembre de 2020 a las 15:55:26 UTC+1, 
victormar...@gmail.com escribió:

> Did you try with escaped double quotes?  Something like:
>
>
>- bat "\"${msbuild}\" AoC/Source/project-GRDK.sln /t:Rebuild 
>/p:configuration=\"Release Steam D3D11\" " 
>
>
> You can also use the multilne approach to avoid the escape of double 
> quotes:
>
>
>- bat """ "${msbuild}" AoC/Source/project-GRDK.sln /t:Rebuild 
>/p:configuration="Release Steam D3D11" """ 
>
>
>
> On Friday, 6 November 2020 at 14:06:47 UTC jfern...@forgottenempires.net 
> wrote:
>
>> I have a pipeline which builds a C++ project for that I am using MSBuild, 
>> untill now we were using the "Final" configuration parameter, but now I 
>> need to switch it to "Release Steam D3D11", when I try to do that I get an 
>> error on Jenkins when building the project I guess it is because of the 
>> spaces, how can I make Jenkins to take this parameter? this is what I have 
>> tried:
>>
>> ```
>> stage('Build'){
>> steps{
>> script {
>> def msbuild = tool name: 'MSBuild', type: 
>> 'hudson.plugins.msbuild.MsBuildInstallation'
>> bat "\"${msbuild}\" AoC/Source/project-GRDK.sln 
>> /t:Rebuild /p:configuration=Release Steam D3D11" 
>> } 
>> }
>> }
>> ```
>>
>> I have also tried adding ' ' to the configuration name such as : 
>> ```
>> bat "\"${msbuild}\" AoC/Source/project-GRDK.sln /t:Rebuild 
>> /p:configuration='Release Steam D3D11'" 
>> ```
>> but it does not work neither
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/878175da-9102-4fa8-9927-c6aee49b061cn%40googlegroups.com.