Skip to main content

Command Palette

Search for a command to run...

Day 15 - Getting Started With Jenkins

Updated
•4 min read•View as Markdown
Day 15 - Getting Started With Jenkins
P

Hey!! I am a Pooja Patil. I started writing articles on DevOps and cloud journey. My purpose is share the concept knowledge that i learn. the task that i perform regarding Devops. Welcome to my Blog!!!

Jenkins History

Jenkins automates the entire software development life cycle. Jenkins was originally developed by Sun Microsystem in 2004 under the name Hudson. It can run on any platform without any compatibility issues.

What is Jenkins?

Jenkins is an open-source platform written in java programing language. that runs on Windows, Mac,OS and another unix-like operating system. It is free Community support.

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.

processes, including building, testing, and deploying code. It is commonly used in a DevOps workflow to integrate and coordinate different stages of the software development lifecycle, such as continuous integration and continuous delivery.

Jenkins Installation Steps -

Step 1 - Install Java

Update your system

sudo apt update

Install java

sudo apt install openjdk-11-jre

Validate Installation

java -version

Step 2 - Install Jenkins

Just copy these commands and paste them onto your terminal.

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

Step 3 - Start jenkins

sudo systemctl enable jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins

Step 4 - Open port 8080 from AWS Console

Advantages of Jenkins

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

Features of Jenkins

  • Easy Installation

  • Available Plugins

  • Easy Configuration

  • Easy Distribution

  • Free Open Source

Continuous Integration

  • Continuous Integration is a development practice where the codes can be integrated into a shared repository.

  • Continuous Integration triggers the build to find and identify bugs present in the code. It adds consistency to the build process. It’s a means to build things faster and prevents broken code.

Continuous Delivery

  • CD or Continuous Delivery is carried out after Continuous Integration to make sure that we can release new changes to our customers quickly in an error-free way. This includes running integration and regression tests in the staging area (similar to the production environment) so that the final release is not broken in production. It ensures to automate the release process so that we have a release-ready product at all times and we can deploy our application at any point in time.

What is a Jenkins pipeline?

  • The pipeline represents the continuous delivery and continuous integration of all the jobs in the SDLC and DevOps life cycle.

  • The Jenkins pipeline is a set of plugins that support implementation and integration of continuous delivery pipelines into Jenkins. It connects this pipeline in a particular format by Jenkins.

  • The Jenkins pipeline solves several problems like the maintenance of thousands of jobs and maintaining deployment with needing to resort to other powerful methods.

  • The three different types of Jenkins pipelines are:

    • CI/CD pipeline

    • Scripted pipeline

    • Declarative pipeline

What is Jenkinsfile?

Jenkins file is a text file that has a definition of a Jenkins pipeline and is checked into the source control repository. It enables code review and iteration on the pipeline. It also permits an audit trail for the pipeline.

Plugins

A plugin is an enhancement to the Jenkins system. They help extend Jenkins capabilities and integrated Jenkins with other software. Plugins can be downloaded from the online Jenkins Plugin repository and loaded using the Jenkins Web UI or CLI. Currently, the Jenkins community claims over 1500 plugins available for a wide range of uses.

  • Plugins help to integrate other developer tools into the Jenkins environment, add new user interface elements to the Jenkins Web UI, help with administration of Jenkins, and enhance Jenkins for build and source code management.

    What is a Build Job?

    A Jenkins build job contains the configuration for automating a specific task or step in the application building process. These tasks include gathering dependencies, compiling, archiving, or transforming code, and testing and deploying code in different environments.

    Jenkins supports several types of build jobs, such as freestyle projects, pipelines, multi-configuration projects, folders, multibranch pipelines, and organization folders.

What is Freestyle Projects ??

  • A freestyle project in Jenkins is a type of project that allows you to build, test, and deploy software using a variety of different options and configurations.

Thanks for learning with me and reading my blog!

Also for your valuable time.

Happy Learning!!

More from this blog

Devops with Pooja

26 posts