Getting started with Jenkins
Day 22 #90daysofDevops

Hi there! My name is Yashswini and I'm a Linux Engineer with 3 years of experience in automation, continuous integration, and deployment. My expertise lies in DevOps and Cloud Computing with a focus on AWS. I have hands-on experience in various tools and technologies related to infrastructure automation, managed services, containerization, and monitoring and logging. I have a passion for troubleshooting and resolving issues and I'm always eager to learn and explore new technologies
1. What is CI/CD?
Continuous Integration and Continuous Delivery (CI/CD) is a software development approach that aims to improve the speed, efficiency, and reliability of software delivery. This approach involves frequent code integration, automated testing, and continuous deployment of software changes to production.
CI/CD enables teams to work together, integrating their code changes frequently, and automating the testing and deployment process.
2 . How does CI/CD work?
CI/CD is an automated process that involves frequent code integration, automated testing, and continuous deployment of software changes to production.

Let's understand more,
✔️Continous Integration
Continuous integration is a phase of DevOps in which we continuously integrate all the different parts of the software development process, like development, building, testing, staging, deployment, and monitoring. It helps us to not only integrate all of these parts together but it also helps us automate a lot of the processes.
The benefits of continuous integration:
Increases the quality of software produced
Makes life easier for testers by allowing them to easily test the software
Reduces the amount deployment failures
Automates the build process
Increases the speed with which software is deployed
We generally tend to use a tool for this phase and the candidates for this are: Jenkins
✔️Automated Testing
Once the code is integrated, the next step is automated testing. Automated testing involves running a suite of tests to ensure that the code changes are functional, meet the expected quality standards, and are free of defects.
This step helps identify issues early in the development process, allowing developers to fix them quickly and efficiently.
✔️Continuous Delivery
Once code has been tested and built as part of the CI process, CD takes over during the final stages to ensure it's packaged with everything it needs to deploy to any environment at any time. CD can cover everything from provisioning the infrastructure to deploying the application to the testing or production environment.
With CD, the software is built so that it can be deployed to production at any time. Then you can trigger the deployments manually or move to continuous deployment, where deployments are automated as well.
✔️Continuous Deployment
After the code changes pass the automated testing step, the next step is continuous deployment. In this step, the code changes are automatically deployed to a staging environment for further testing.
This step aims to ensure that the software is continuously updated with the latest code changes, delivering new features and functionality to users quickly and efficiently.
✔️Production Deployment
The final step in the CI/CD pipeline is production deployment. In this step, the software changes are released to end users. This step involves monitoring the production environment, ensuring that the software is running smoothly, and identifying and fixing any issues that arise
The four steps of a CI/CD pipeline work together to ensure that software changes are tested, integrated, and deployed to production automatically. This automation helps to reduce errors, increase efficiency, and improve the overall quality of the software.
Now let's find out about tools used for CI/CD processes
3 . What is Jenkins?
Jenkins is an Open Source continuous integration tool written in java that allows us to automate the software development process, making sure that there is minimum involvement from us. It integrates all the different parts of the development in one place, which makes it easier to handle all the different parts of the software development process.
For eg. If you wanted to automatically build your software from your GitHub repository, you can configure a job to clone the repo into a local workspace and then build that code using a build file and then directly send it for testing.

🚀Jenkins was originally developed under the name Hudson back in 2004 by the organization sun microsystems.
Some typical reasons why Jenkins is so widely used are:
Developers and testers use Jenkins to detect defects in the software development lifecycle and automate the testing of builds.
They use it to continuously monitor the code in real time and integrate changes into the build.
Jenkins as it turns out, is a great fit for building a CI/CD pipeline because of its plugin capabilities, and simple-to-use nature.
4 . Installation of Jenkins
I will be using the Ubuntu Linux VM available on AWS (cloud provider)
👉Jenkins requires Java in order to run by following the below steps


👉After that follow these weekly release steps

👉Now after the installation it is time to start Jenkins


👉now check the i/p address of the server and add port no. 8080 in the security group( if the site is not working) and select "my ip" in the source tab so that you only access the Jenkins, and again now take your ip:8080 on browser

👉 Let's unlock Jenkins and unlock it first

👉now install suggested plugins

👉as plugins get installed not the next page create your username and password to log in


👉Jenkins Dashboard

5 . Create a freestyle pipeline to print "Hello World!!
Before starting let us understand what do we mean by Jenkins Job.
🚀Jenkins Jobs
Any automated task/process that is implemented in Jenkins is a Jenkins Job.
Examples of these automated tasks are: building the source code, downloading the source code from version control, compiling it, running unit tests, and merging source code from any source code management like git.
A step-by-step guide to creating your first freestyle project on Jenkins with Git
👉Step 1:

👉Step 2:

👉Step 3:

👉Step 4:

👉Step 5:

Here is the end of this blog rest we will learn deeply about Jenkins in the next blog...
stay continue... Happy Learning 😃



![Jenkins Freestyle Project for DevOps Engineers[Day-23 Task]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1690291895202%2Fc7012bdd-d2f6-44e4-8d64-6d071c0c7c39.png&w=3840&q=75)