Jenkins Integration Server
In the previous chapter, we studied the concept of "Continuous integration" aka "CI". In order to create an environment for a project with CI enabled, a tool is required for the same. Hence, Jenkins jumps into the action. Jenkins is an open source tool to make the continuous integration.
Jenkins was the project which was forked from Hudson due to some issues with the Oracle. Jenkins is basically a server based system running in a servlet container which is nothing but the apache tomcat. It supports many tools like Git, SVN, Mercurial and Clearcase. Jenkins was primarily started by a developer called Kuhsoke Kawaguchi.
What Jenkins does?
The primary job of the Jenkins is to execute a list of steps configured which is based on a trigger. Below are the list of steps/tasks performed by Jenkins when triggered :
- Perform the code compilation & build the software with ANT, Maven or Gradle.
- Run an internal shell script
- Archive the resultant builds
- At last start the execution of the integration tests.
- Monitoring the execution of the above tasks.
- Provision to stop the build in case of failure in any of the steps.
- Notifying the user about the success or failure of each build.
What Jenkins focuses on?
Jenkins mainly focuses on 2 important activities :
- Continuous build of the software : Nothing but the creating a continuous integration environment
- Monitoring execution of external jobs : This monitors the jobs defined - CRON jobs.
Features of Jenkins
- Easy to install & configure.
- Permanent link - readable URLs for the build details.
- Email integration for notifications.
- JUnit tests reporting.
- Tagging support for every successful builds.
- Distributed builds.
- File fingerprinting for managing dependencies
- Plugin support
Jenkins Best Practices
Below are the list of some best practices to be made while working with Jenkins :
- Always secure Jenkins - user authentication.
- Use file fingerprinting to manage dependencies.
- Integrate Jenkins with the issue tracking systems like JIRA.
- Always configure Jenkins to generate a trend report.
- Setup Jenkins on a partitioned space where the disk space is more.
- Setup different jobs for maintenance and development projects.
- Archive unused jobs before deleting them.
- Setup email notification to all the developers of the team.
- Tag, Branch, Baseline after each successful build.