DAY22:Getting Started with Jenkins

DAY22:Getting Started with Jenkins

What is Jenkins?

Jenkins is a tool that is used for automation, and it is an open-source server that allows all the developers to build, test and deploy software. It works or runs on java as it is written in java. By using Jenkins we can make a continuous integration of projects(jobs) or end-to-endpoint automation.

Let us do discuss the necessity of this tool before going ahead to the procedural part for installation. Nowadays, humans are becoming lazy day by day so even having digital screens and just one click button in front of us then also need some automation. Here, I’m referring to that part of automation where we need not have to look upon a process(here called a job) for completion and after it doing another job. For that, we have Jenkins with us.

Advantages of Jenkins include:

  • It is an open-source tool with great community support.

  • It is easy to install.

  • It has 1000+ plugins to ease your work. If a plugin does not exist, you can code it and share it with the community.

  • It is free of cost.

  • It is built with Java and hence, it is portable to all the major platforms.

The above diagram is depicting the following functions:

  • First, a developer commits the code to the source code repository. Meanwhile, the Jenkins server checks the repository at regular intervals for changes.

  • Soon after a commit occurs, the Jenkins server detects the changes that have occurred in the source code repository. Jenkins will pull those changes and will start preparing a new build.

  • If the build fails, then the concerned team will be notified.

  • If built is successful, then Jenkins deploys the built in the test server.

  • After testing, Jenkins generates a feedback and then notifies the developers about the build and test results.

  • It will continue to check the source code repository for changes made in the source code and the whole process keeps on repeating.

Create a freestyle pipeline to print "Hello World!!

1.Create EC2 instance take public IP and as already jenkins is installed on system

change security and add port number 8080.

i.e. ip should be something like this for Jenkins http://3.86.60.168:8080/

Create credentials and login to the Jenkins.

Click on new item to create new free style project like below:

And Here is output..!!!

Declarative Pipeline:Hello World!!

4 Stages:

1.Clone

2.Build

3.Test

4.Deploy

Thank you for reading!! Hope you find this helpful.

#day22challenge#90daysofdevops

Always open for suggestions..!!

Thankyou Shubham Londhe !!