Showing posts with label Jenkins Sonar Integration. Show all posts
Showing posts with label Jenkins Sonar Integration. Show all posts

Configure Jenkins with SonarQube for static code analysis and integration


Sonar and jenkins Intgration

Continuous integration deals with merging code implemented by multiple developers into a single build system. Developers frequently integrate their code and the final build is automated, developer unit test are executed automatically to ensure the stability of the build. This approach is inspired by extreme programming methodologies. With a test driven approach put into place continuous integration would yield in the following benefits.

1.Install SonarQube Plugin

2.Globa settings
3.Project level configuration

here "Sonar way is defualt profile". you can create new profile also.


4.Adding profile in pom.xml

  <profile>
  <id>sonar</id>
  <properties>
    <sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar</sonar.jdbc.url>
    <sonar.jdbc.driverClassName>com.mysql.jdbc.Driver</sonar.jdbc.driverClassName>
    <sonar.jdbc.username>sonar</sonar.jdbc.username>
    <sonar.jdbc.password>sonar</sonar.jdbc.password>
    <sonar.host.url>http://localhost:9000/sonar/</sonar.host.url>
  </properties>
</profile>