Jenkins is a free Continuous Integration tool which can be very useful for writing quality code.
The best recommendation to successfully install it is following the instructions described on the url:
It describes the correct installation of Jenkins CI step by step depending on your Operating System.
The constraints to use Jenkins are:
The system must be able to be built and tested automatically.
The system must be under configuration management.
Everyone must commit any change frequently (every day or two).
Upon commit, the system is immediately and automatically integrated.
Benefits of CI
Risk reduction: the system will always build, or else will notify quickly.
Bugs and problems are discovered as soon as they are introduced.
System is deployed more frequently, enabling more user feedback.
What Jenkins does
Run as a server
You can define “jobs” to do CI. For example:
Connect to github every minute.
Check if any changes have been committed.
Check out changes.
Build the system
Run Junit, PMD, Checkstyle, FindBugs.
Email features to your project team members.
*The build task can be changed depending on the language used in the project.
Jenkins is extensible, then you can add plug-ins to increase the functionality of it. One of the most used extensions is the connection with sonar, which can basically can be explained in two words: “Code Quality”. Sonar provides us with metrics such as complexity, Lines of code, Documentation, technical debt and several other useful stats.
The configuration of the them depends of each job, in other words, the creation and configuration of one job for a project built on Maven and Java is different than building a project on Msbuild and C#. Therefore in order to build the system a solution must be adapted for each type of job.