O'Reilly logo

Jenkins 2.x Continuous Integration Cookbook - Third Edition by Alan Mark Berg, Mitesh Soni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Go to the Build section and select Execute SonarQube Scanner:
  1. You can provide the location of sonar-project.properties or provide details directly for static code analysis.
# Required metadata 
sonar.projectKey=SonarHTMLCSSJS 
sonar.projectName=Simple HTML CSS JS project analyzed with the SonarQube 
sonar.projectVersion=1.0 
# Comma-separated paths to directories with sources (required) 
sonar.sources=. 
# Encoding of the source files 
sonar.sourceEncoding=UTF-8 
  1. sonar.sources is the main property for static code analysis. With this property, you inform SonarQube which directory needs to be analyzed:
  1. Click on Save.
  2. Go to Jenkins ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required