DevOps ~ Jenkins - rohit120582sharma/Documentation GitHub Wiki

Jenkins is an open-source CI/CD tool written in Java that allows continuous development, test, and deployment of newly created code.

It is an Automation tools, used to Build and Deliver the software product.

It is a server-based application and requires a web server like Apache Tomcat to execute.

Jenkins is popular because of its monitoring of repeated tasks which arise during the development of a project.

Why use continuous integration with Jenkins?

  • Code is built and test as soon as developer commits code. Jenkins will build and test the code many times in a day or you can execute Jenkins job multiple times to build and test your product code in a day.
  • On Successful build, Jenkins will deploy the source into the test server and notifies the deployment team.
  • On Build Failures, Jenkins will notify the errors to the developer team.
  • Jenkins also supports cloud-based architecture so that you can deploy Jenkins in cloud-based platforms.
  • Jenkins supports docker containers, so that you can containerized Jenkins process/service.

Features

  • Jenkins is a self-contained Java-based program, ready to run with packages for Windows, Mac OS X and Unix-like OS.
  • It can be easily set up and configured via its web interface which includes error checks and built-in help.
  • It has hundreds of plugins and integrates with every tool in the CI and CD toolchain.
  • Jenkins can be extended via its plugins architecture and provides nearly infinite possibilities for what it can do.
  • It can easily distribute work across multiple machines, helping in faster builds, tests and deployments across multiple platforms.


Architecture

The Jenkins server accesses the master environment and the master environment can push down to multiple other Jenkins slave environment to distribute the workload.

That lets you run multiple builds, tests, and product environment across the entire architecture.

Supported on a master-slave architecture, Jenkins comprises many slaves working for a master. This architecture - the Jenkins Distributed Build - can run identical test cases in different environments. Results are collected and combined on the master node for monitoring.

Parts:

Master

  • Schedule the build jobs.
  • Dispatches builds to the Slave for actual job execution.
  • Monitoring the slave and recording the build results.
  • Can also execute build jobs directly

Job

  • Job is refer to runnable tasks that are controlled and monitors by Jenkins.

Slave / Node

  • A slave is a Java executable that runs on a remote machine.
  • It is also called Jenkins Node. Node is used to refer all machines that are part of Jenkins grid, slaves and master.
  • Jenkins run separate program called **"Slave Agent" on slaves.
  • When slaves are registered to a master, a master starts distributing the load to slaves.
  • The characteristics of the slave are:
    • It hears requests from the Jenkins master instance.
    • Slaves can run on a variety of operating systems.
    • The job of a slave is to execute build jobs dispatched by the master.

Executor

  • Executor is a separate stream / thread of build to be run on a node in parallel.
  • A node can have one or more executors.

Plugins

  • A plugin is a piece of software that extends the core functionality of the core Jenkins server.
⚠️ **GitHub.com Fallback** ⚠️