Skip to main content

Command Palette

Search for a command to run...

Day-1: Getting Started with Jenkins πŸ˜ƒ

Updated
β€’5 min read
Day-1: Getting Started with Jenkins πŸ˜ƒ

What is Jenkins?

  • Jenkins is an open-source continuous integration-continuous delivery and deployment (CI/CD) automation software DevOps tool written in the Java programming language. It is used to implement CI/CD workflows, called pipelines.

  • 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.

  • Jenkins achieves Continuous Integration with the help of plugins. Plugins allow the integration of Various DevOps stages. If you want to integrate a particular tool, you need to install the plugins for that tool. For example, Git, Maven 2 project, Amazon EC2, HTML publisher etc.

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.

Note: By now Jenkins should be installed on your machine (as it was a part of previous tasks, if not follow below given u tube link of Shubham.

OR you can follow steps from below mentioned link

installing Jenkins

Java is Prerequisites for Jenkins installation

sudo apt-get update
sudo apt install fontconfig openjdk-17-jre

Now we will install Jenkins (Go with Long term release while installing Jankins)

sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins

To check status of Jenkins

systemctl status Jenkins

Edit inbound rules to add Jenkins port

Follow the path mentioned below for the same.

EC2 \> Security Groups > sg-00585ab3cb6b573e3 - launch-wizard-1 > Edit inbound rules

add 8080

Jenkins is ready :)

open a new tab > public_ip:8080

Jenkins URL: http://52.89.79.80:8080/ (Here 52.89.79.80 is public IP of your instance)

Tasks:

Task 1: Write a small article in your own words about

Jenkins is an open-source automation server used for Continuous Integration (CI) and Continuous Delivery (CD) in software development. It automates repetitive tasks like building, testing, and deploying code, saving time and reducing errors. Jenkins integrates with tools like Git and Docker, improving code quality and team collaboration. By automating the integration and deployment processes, Jenkins ensures that new code changes are seamlessly tested and delivered. It is scalable, flexible, and customizable with plugins, making it essential for efficient and reliable software development workflows.

  • Reflect on how Jenkins integrates into the DevOps lifecycle and its benefits.

Jenkins seamlessly integrates into the DevOps lifecycle by automating and streamlining various stages of software development. Here’s how it fits in and the benefits it offers:

Integration into the DevOps Lifecycle

  1. Continuous Integration (CI): Jenkins automates the process of integrating code changes from multiple contributors into a shared repository. It continuously builds and tests the code, ensuring that new changes do not introduce bugs.

  2. Continuous Delivery (CD): Jenkins extends CI by automating the deployment of code to production or staging environments. This ensures that new features and fixes are delivered quickly and reliably.

  3. Pipeline Automation: Jenkins uses pipelines to manage and automate complex workflows. This helps in coordinating different stages of development, from code commit to deployment.

  4. Monitoring and Feedback: Jenkins provides real-time feedback on the state of the codebase, allowing teams to address issues early in the development cycle.

Benefits

  • Efficiency: Automates repetitive tasks, reducing manual effort and accelerating development cycles.

  • Consistency: Ensures consistent builds and deployments, minimizing errors and inconsistencies.

  • Collaboration: Facilitates better team collaboration by providing a unified platform for integrating and deploying code.

  • Scalability: Adapts to projects of all sizes and complexities, making it suitable for various development environments.

  • Customization: Offers extensive plugin support to tailor the tool to specific needs and integrate with other tools.

Overall, Jenkins enhances the DevOps lifecycle by improving automation, consistency, and collaboration, leading to faster and more reliable software delivery.

  • Discuss the role of Jenkins in automating the build, test, and deployment processes.

Jenkins is key in automating the build, test, and deployment processes, boosting efficiency and consistency in software development. πŸš€

1. Build Automation:

Jenkins triggers builds automatically when code changes are committed, ensuring regular integration and reducing conflicts. It compiles code and packages binaries, minimizing manual effort and errors. πŸ› οΈ

2. Test Automation:

Jenkins integrates with testing frameworks (like JUnit, Selenium) to automatically run tests during the build process. This helps identify bugs early and maintain code quality. It also provides detailed test reports for quick issue resolution. πŸ§ͺ

3. Deployment Automation:

Jenkins automates the deployment of code to various environments (dev, staging, production). It handles rollouts and rollbacks, ensuring smooth and reliable deployments. 🌐

Benefits:

  • Consistency: Ensures uniform builds, tests, and deployments.

  • Speed: Accelerates the development cycle.

  • Feedback: Provides immediate insights on code status.

  • Efficiency: Reduces manual tasks, letting developers focus on coding. πŸ”„

Jenkins streamlines CI/CD processes, making development faster and more reliable! πŸ’»

Happy learning and stay tuned for more as we continue with Jenkins on Day 2!

More from this blog

DevOps journey

34 posts

In this DevOps journey, we’ll explore a range of DevOps tools and related projects.