Jenkins is an open-source project written in Java that runs on different platforms ( Windows, Linux, Mac OS, etc.). It was originally developed by Sun Microsystem in 2004 under the name Hudson but later named Jenkins when Oracle bought Microsystems.
Jenkins is a CICD ( Continuous Integration Continuous Deployment) tool that automates the entire software development lifecycle including build, document, test, package, stage, deploy, static analysis, and much more.
Workflow of Jenkins
Let us consider the basic example to understand how Jenkins works.
When the developers push the code in Github, Jenkins pulls the code to the build stage using the build tools such as (maven, ant, gradle, etc). Once the build step is completed the code is sent to the test stage for testing using( Selenium, Cucumber, etc) tools. The final step is to deploy the code in the environment.
Advantages of Jenkins
It is an open-source tool.
Jenkins has a free huge community and plugin support available.
It behaves as a Cron Server replacement i.e. can do the scheduled task.
Jenkins can have multiple agents attached to its master node. So we can schedule n no. of jobs on the slave nodes.
Simple Project - Create a freestyle job in Jenkins to print "Hello World!"
Click on +New Item to create a new freestyle job.
Enter the new item name and click on Freestyle project.
Enter the Description, go to the build steps, and click on Execute Shell. Write the code in the shell to print the hello world.
To run the build, click on Build Now. Your first job is created successfully!