πŸš€ From Manual to Automated: My Jenkins-Powered CI/CD Journey

Suyash DahituleSuyash Dahitule
3 min read

DevOps isn't just about deploying code β€” it's about doing it reliably, repeatedly, and automatically. Over the past several days, I transformed my knowledge of Jenkins from theoretical to fully practical by building automation pipelines, exploring agent configurations, and finally implementing a complete CI/CD system for a real project.

Here’s how it unfolded πŸ‘‡

πŸ’‘ Understanding Jenkins & CI/CD Concepts

My journey started with understanding the core purpose of Jenkins β€” a powerful open-source tool to orchestrate Continuous Integration and Delivery.

I explored:

  • The Jenkins UI and how to configure jobs

  • Different types of jobs: freestyle vs. pipeline

  • How Jenkins connects with GitHub via webhooks

  • How Jenkins works internally: master-slave (controller-agent) architecture

  • Use of console logs to debug pipeline execution

One of the coolest parts was watching a Jenkins job trigger automatically the moment I pushed code to GitHub β€” magic backed by webhooks and pipelines.

πŸ”§ Declarative Jenkins Pipelines

Next, I moved into writing Declarative Pipelines using the pipeline { ... } syntax.

What I learned:

  • How to define stages like Build, Test, Push, and Deploy

  • The power of post blocks to handle notifications

  • How Jenkins handles failures and visualizes builds

  • How to add credentials for Docker Hub securely

These concepts made me realize Jenkins isn’t just a tool β€” it's a language for automating workflows.

πŸ”„ Jenkins + GitHub Integration

I configured:

  • A GitHub webhook to auto-trigger builds on push

  • SCM Polling as a backup trigger method

  • Used Declarative Pipelines with embedded GitHub repo references

  • Stored sensitive data (like DockerHub credentials) using Jenkins credentials manager

This setup gave me the confidence to automate even more complex flows without human intervention.

πŸ§ͺ Automating Docker Image Builds & Push

Once the pipeline was stable, I introduced:

  • Multi-stage Dockerfile to ensure production-grade builds

  • Pipeline stage to build Docker image

  • Another stage to push the image to Docker Hub

This drastically reduced the manual effort I had to do after every code change β€” no more docker build, docker tag, and docker push from my terminal.

πŸ” Auto Deployment with Docker Compose

With Jenkins pushing the latest image to Docker Hub, the next step was automated deployment:

  • Jenkins remotely executed docker-compose pull and docker-compose up -d to deploy the latest version

  • No SSH, no terminal, no downtime β€” just automation.

This completed my CI/CD flow from code commit β†’ deployment πŸš€

πŸ“¬ Bonus: Email Notifications with post Block

To make the pipeline even more production-ready, I added:

  • An email notification at the end of the pipeline

  • Configured it inside the post { success { ... } } block

It gave me real-time feedback whenever the deployment succeeded, directly in my inbox.

πŸ› οΈ Final Project: CI/CD for Online Shop App

To bring all the above concepts into a real use-case, I extended my Online Shop Project with a Jenkins-based CI/CD pipeline.

πŸ”¨ Technologies Used:

  • Jenkins

  • Docker & Docker Compose

  • GitHub Webhooks

  • Docker Hub

  • Email Notification

πŸ”— Project Highlights:

  • Branch: project

  • Contains: Jenkinsfile, Dockerfile, docker-compose.yml, and CI/CD logic

  • Pipeline Flow:

    • Push to GitHub

    • Auto-trigger via webhook

    • Checkout β†’ Build β†’ Push image β†’ Deploy β†’ Notify via email

This wasn’t just practice β€” it was my first end-to-end real-world pipeline automation!

πŸ™Œ What I Took Away

πŸ”Ή Writing pipelines helped me think like a DevOps engineer, not just a coder
πŸ”Ή Jenkins is more than a CI tool β€” it’s the engine of automation
πŸ”Ή CI/CD is all about making things faster, safer, and repeatable

πŸ’­ What's Next?

Up next: DEVSECOPS, and possibly deploying to the cloud. The foundation is set β€” now it’s time to scale it up! 🌍

πŸ”– Tags:

#Jenkins #DevOps #CI_CD #Automation #Docker #GitHub #DockerHub #OnlineShop #TrainWithShubham #LearnInPublic #90DaysOfDevOps

0
Subscribe to my newsletter

Read articles from Suyash Dahitule directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Suyash Dahitule
Suyash Dahitule