Getting Started with Jenkins:

A Beginner’s Guide to CI/CD
Published on: 11th July 2025
Author: Neha Chaturvedi
📌 What is Jenkins?
Jenkins is an open-source automation server used to build, test, and deploy software. It helps developers implement Continuous Integration (CI) and Continuous Delivery (CD), making it easier to detect errors early and deploy code faster.
It’s like a smart assistant that automatically runs tasks every time you update your code.
💡 Why Use Jenkins?
✅ Automates repetitive tasks like building and testing
✅ Integrates with GitHub, GitLab, Docker, and more
✅ Huge plugin ecosystem (over 1,800+ plugins)
✅ Supports pipelines as code (
Jenkinsfile
)✅ Freely available and widely used in the industry
🧰 Prerequisites
To follow this guide, you’ll need:
Java installed (
Java 11
or17
recommended)Basic understanding of Git and a programming language (e.g., Java, Python)
A GitHub or GitLab repository
🚀 Installing Jenkins (Locally)
Step 1: Download and Run Jenkins
Go to the official Jenkins website
Download the version for your OS (Windows, macOS, or Linux)
Install it and run:
java -jar jenkins.war
Step 2: Access Jenkins
Once Jenkins starts, open your browser and go to:
arduinoCopyEdithttp://localhost:8080
Enter the admin password from the terminal and install suggested plugins.
🔧 Creating Your First Job
Click “New Item”
Choose “Freestyle project”
Name it (e.g.,
MyFirstJenkinsJob
)Under Source Code Management, connect to your GitHub repo
Under Build, add a shell command like:
bashCopyEditecho "Hello from Jenkins!"
- Save and click Build Now
✅ You’ve just run your first automated job!
🔁 What is a Jenkins Pipeline?
A Pipeline is a script that defines the full CI/CD workflow. It’s written in Groovy and stored in a file called Jenkinsfile
.
Example Jenkinsfile
:
groovyCopyEditpipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building...'
}
}
stage('Test') {
steps {
echo 'Testing...'
}
}
stage('Deploy') {
steps {
echo 'Deploying...'
}
}
}
}
Put this file in the root of your repo and Jenkins will automatically detect and run it.
🔌 Popular Jenkins Plugins
Git Plugin – Integrate with GitHub/GitLab
Docker Plugin – Build and push Docker containers
Slack Plugin – Send build notifications to Slack
JUnit Plugin – Test result reporting
📈 Jenkins in Real Projects
In real-world projects, Jenkins:
Runs builds automatically when you push code
Runs unit/integration tests
Deploys code to staging or production servers
Sends alerts if a build fails
🧠 Final Thoughts
Jenkins is a powerful tool to automate software workflows, and learning it is a must for any DevOps engineer or backend developer. Once you understand the basics, you can explore advanced features like:
Jenkins agents (distributed builds)
Parallel stages
Secure credentials handling
Integration with Kubernetes and cloud platforms
📚 Further Resources
Subscribe to my newsletter
Read articles from neha chaturvedi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
