Jenkins (part 1)→The Heart of SDLC

Aakib
7 min readNov 21, 2023

--

Let’s have a detailed discussion on jenkins →a ci-cd tool with a complete project

What is jenkins →

  1. Jenkins is the automation ci-cd tool that is open source and written in java and compatible on windows ,macos, and other unix like os in simple terms it pulls the code from github then build and test it using build tools such as maven and after building and testing it deploy the code where you want such as a Instance in aws etc..
  2. It automate the entire SDLC
  3. jenkins was originally developed by SUN microsystem in 2004 under the name of hudson later bought by oracle

What is plugins in Jenkins →

they are basically the connecters which connects jenkins to github ,awscloud ,dockerhub etc.. jenkins only do the the services if plugin of that service is install → below is the image showing the details of github plugin

How to Setup Jenkins on ubuntu →

Step 1 → First, add the repository key to your system: command below

wget -q -O — https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg — dearmor -o /usr/share/keyrings/jenkins.gpg

step 2 → Next, let’s append the Debian package repository address to the server’s sources.list:

sudo sh -c ‘echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’

step 3 → sudo apt update

step 4 → sudo apt install jenkins

step 5 →service jenkins status

this is output of the above command

Step 6 → Now go to your browser and type http://localhost:8080 you will see the following page

copy thr location and go to your terminal

run →cat <paste copied location >

you are given with password paste it to above password section now you have to create a user let’s just skip and go to your install suggested plugins section

wait for 4 to 5 min for plugin installation and then you are enter into the welcome page of jenkins

well i’m done some work here so it is showing you to like this

Now let’s get to know some sections of dashboard →

Jenkins dashboard sections →

  1. New Item
  2. People
  3. Build History
  4. Project Relationship
  5. Check File Fingerprint
  6. Manage Jenkins
  7. My Views

New Item →

on clicking on this option you will see the follwing options

1. Freestyle project →

Freestyle Project in Jenkins is a user-friendly way to automate tasks or processes by configuring jobs through a point-and-click interface, making it accessible to users who may not be comfortable with writing code.

  1. Easy Configuration: It’s called “Freestyle” because it allows you to configure your job using a graphical user interface (GUI) rather than writing code or scripts.
  2. Graphical Setup: You don’t need to be a programmer to use it. You can set up your job by filling in forms and selecting options using buttons and dropdowns on the Jenkins web interface.
  3. No Coding Required: Unlike some other job types in Jenkins that might require scripting knowledge (like Pipeline projects), Freestyle Projects are designed to be accessible to users with minimal coding experience.

2. Maven Project →

“Maven Project” is like a helper for projects built with Maven, a tool for building and managing software. It helps Jenkins understand how to automatically build and organize your Maven-based projects, making it easier to handle things like dependencies and project tasks without you having to do everything manually. It’s like a friend that takes care of the nitty-gritty details so you can focus on your coding.

3. pipeline →

we generally use this section to automate the development process

“Pipeline” is like a set of instructions or a plan for how to build, test, and deploy your software. It’s a clear path that automates the steps from writing code to delivering the final product. Think of it as a helpful guide that ensures your software journey is smooth and reliable.

4. Multi configuration project →

“Multi-Configuration Project” is like a superhero job that can do the same tasks in different ways. It helps test or build your software on various setups, such as different operating systems, making sure it works everywhere. It’s a time-saving way to check your code in multiple scenarios at once.

5 . Folder →

“Folder” is like a digital organizer for your projects. It helps you group and manage related jobs in one place, making it easier to navigate and organize your continuous integration and delivery setup. Think of it as a virtual filing cabinet for keeping your Jenkins projects neat and tidy.

6. Multibranch pipeline →

“Multi-Branch Pipeline” is like a smart assistant for handling code branches in version control. It automatically creates separate pipelines for different branches of your code, streamlining the process of building, testing, and deploying for each branch. It’s a handy tool for managing multiple versions of your software with ease.

7. Organization Folder →

It allows you to automatically create and manage folders for projects based on their source code repositories or organizational structure. It helps organize and categorize projects dynamically, adapting to changes in your version control system

Advantages of jenkins

  1. Open Source: Jenkins is free and open-source, making it accessible to a wide range of users and organizations without the need for significant financial investment.
  2. Extensibility: Jenkins supports a vast ecosystem of plugins, allowing users to extend its functionality to integrate with various tools, version control systems, and other technologies.
  3. Automation: Jenkins automates repetitive tasks involved in the software development lifecycle, such as building, testing, and deploying applications. This automation leads to increased efficiency and reduced manual errors.
  4. Integration Capabilities: Jenkins seamlessly integrates with version control systems like Git, enabling automatic triggering of builds and deployments upon code changes. It also integrates with various testing frameworks and deployment tools.
  5. Wide Community Support: Jenkins has a large and active community of users and developers. This community support provides access to a wealth of knowledge, plugins, and solutions through forums, documentation, and user contributions.
  6. Customizable Dashboards: Jenkins allows users to create custom dashboards, providing a visual representation of build and deployment statuses. This helps in monitoring and managing projects effectively
  7. Distributed Builds: Jenkins supports distributed builds, allowing users to distribute build and test tasks across multiple machines. This is beneficial for handling larger projects and improving overall build performance.
  8. Easy Configuration: Jenkins uses a user-friendly web interface for configuration, making it accessible to users with varying technical backgrounds. Users can configure jobs, build pipelines, and other settings through the graphical interface.
  9. Security: Jenkins provides security features, including authentication, authorization, and role-based access control. This ensures that only authorized users have access to sensitive information and actions within the Jenkins environment.
  10. Platform Independence: Jenkins is platform-independent and can run on various operating systems, making it flexible and adaptable to different infrastructure setups.
  11. Supports Various Project Types: Jenkins supports a wide range of project types, including traditional software projects, as well as projects built with Maven, Gradle, and other build tools. It can handle projects written in different programming languages.
  12. Continuous Monitoring: Jenkins provides plugins for integrating with monitoring tools, enabling continuous monitoring of build and deployment activities, as well as performance metrics.

Disadvantages of Jenkins →

  1. Maintenance Overhead: Maintaining Jenkins instances, especially in large-scale environments, can require ongoing effort. This includes managing plugin updates, security configurations, and ensuring the overall health of the Jenkins server.
  2. Plugin Compatibility: Although the plugin ecosystem is a strength, occasional compatibility issues may arise when updating Jenkins or its plugins. It’s essential to ensure that plugins are compatible with the Jenkins version in use.
  3. Lack of Native Support for Containerization: Jenkins itself doesn’t have native support for containerization (like Docker). While it can be integrated with containerization tools, some other CI/CD tools have more built-in support for containerized workflows.
  4. GUI-Centric: While the graphical user interface (GUI) is user-friendly, some users might prefer or require more text-based or script-centric approaches. Jenkins Pipeline attempts to address this, but users who prefer a more code-centric approach might explore other CI/CD solutions.
  5. Security Concerns: If not configured correctly, Jenkins instances can pose security risks. It’s essential to follow best practices for securing Jenkins, including proper authentication, authorization, and regular security audits.
  6. Community-Driven Development: While the large Jenkins community is a strength, the open-source nature of Jenkins means that updates, bug fixes, and improvements depend on community contributions. Some users might prefer commercial solutions with dedicated support.
  7. User Interface Limitations: The Jenkins user interface, while functional, might not be as modern or visually appealing as some newer CI/CD tools. This is more of an aesthetic consideration than a functional one.

In part 2 we will discuss about some other other sections of jenkins

--

--

Aakib
Aakib

Written by Aakib

Cloud computing and DevOps Engineer and to be as a fresher I am learning and gaining experiance by doing some hands on projects on DevOps and in AWS OR GCP

Responses (2)