How to use sonar-scanner with Jenkins

Using Sonarqube 6.7.7
sonar-scanner 3.3

Jenkins 2.222.3
sonarqube plugin 2.11

I am trying to run sonar scanner within scanner and I want it to pick up the properties from the sonar-project.properties instead of manually entering each property.

I tried

sonar-project.properties=
but that didn’t work

Brian

sonar-project.properties is a file that you add to your code base. It contains a key=value list of the properties you’re trying to set. The scanner will automatically find the file and use the properties listed in it.

NOTE 1: Any properties specified on the scanner command line will override properties specified in the sonar-project.properties file.

NOTE 2: The sonar-project.properties file does not work with the Sonar Maven scanner. You must specify each property in the Maven POM file.

1 Like