Jenkins Jenkins Integration Server

In the previous chapter, we studied the concept of "Continuous integration" aka "CI". o 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 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 does Jenkins do?

  • Perform the code compilation & build the software with ANT, Maven or Gradle.
  • Run an internal shell/ Batch scripts.
  • Archive the builds Status or Artifacts.
  • Start the execution of the integration tests.
  • Monitoring the execution of the tasks.
  • You can stop the Build, in case of failure in any of the steps.
  • Notifying the user about the Status of the Build.

 

What Jenkins focus on?

  • The continuous build of the software:  CI aims to provide rapid feedback so that when a defect is introduced into the code base, it is identified and corrected as soon as possible.
  • Monitoring and alerting: This monitors the jobs defined - CRON jobs.

 

Features of Jenkins

  • Email integration for notifications.
  • Permanent link - readable URLs for the build details.
  • Easy to install & configure for all major Operating systems.
  • All Possible tests reporting, But JUnit Comes Nativly.
  • Tagging support for every successful build.
  • Distributed builds among different Agents.
  • File fingerprinting for managing dependencies
  • Plugin support for different Features.

 

Jenkins Best Practices

  • Always secure Jenkins - user authentication or Token authentication.
  • Use file fingerprinting to manage dependencies.
  • Integrate Jenkins with the issue tracking systems like JIRA or GitHub/ GitLab.
  • Make Jenkins configure to generate a trend report.
  • Setup Jenkins on a partitioned space where the disk space is more.
  • Setup different jobs for maintenance, development, Test Project.
  • Backup unused jobs before deleting them.
  • Setup email notification to all the developers of the team.
  • Tag, Branch, Baseline after each successful build.