DEV Community

Sushil Baligar
Sushil Baligar

Posted on

Jenkins CI/CD Project

πŸš€ From Local Development to Production: My Journey Building a Complete CI/CD Pipeline

I recently deployed a fully automated Jenkins CI/CD pipeline on AWS, and I want to share what I learned to help others navigate this journey.

🎯 What I Built

A production-ready CI/CD pipeline that reduced deployment time by 50% (10 minutes β†’ 5 minutes) with:

βœ… AWS EC2 deployment with custom domain and SSL
βœ… GitHub webhook integration for instant build triggers (<5 seconds)
βœ… 92% test coverage with 30 comprehensive unit tests
βœ… Python virtual environments for isolated dependencies
βœ… Nginx reverse proxy with Let’s Encrypt SSL
βœ… Full automation β€” 40+ releases/year capability

Live Demo: https://sushilkumarsb.xyz/job/jenkins-cicd-automation/
GitHub: https://github.com/sushilkumarsb/jenkins-cicd-automation

β€” -

πŸ’‘ Key Challenges & Solutions

Challenge 1: Ubuntu 24.04 PEP 668 Restrictions
Python’s new security model blocked system-wide pip installs. Solution? Implemented virtual environments in the Jenkins pipeline β€” better practice anyway!

Challenge 2: Windows β†’ Linux Pipeline Conversion
My Jenkinsfile used Windows bat commands. Converted to sh with python3 for the Ubuntu EC2 instance. Cross-platform awareness is crucial.

Challenge 3: Professional Setup vs. Cost
Achieved enterprise-grade deployment (SSL, custom domain, reverse proxy) for just $12/month using:

  • AWS EC2 free tier eligible
  • Let’s Encrypt (FREE SSL)
  • Nginx (open source)
  • GoDaddy domain ($12/year)

Challenge 4: GitHub Webhook Integration
Configured real-time triggers requiring HTTPS, proper DNS, and security group configurations. The result? Instant builds on every push.

Press enter or click to view image in full size

β€” -

πŸ—οΈ Architecture Overview

Developer (Git Push)
↓
GitHub Webhook (HTTPS)
↓
AWS EC2 Ubuntu 24.04
↓
Nginx :443 (SSL Termination)
↓
Jenkins :8080 (CI/CD Pipeline)
↓
Build β†’ Test (pytest + coverage) β†’ Code Quality
↓
Automated Results & Reports
Enter fullscreen mode Exit fullscreen mode

β€” -

Become a member

πŸ“š What I Learned (For Others Starting Out)

Press enter or click to view image in full size

1. Start Small, Scale Up
I began with local Jenkins, then moved to AWS. Don’t try to build everything at once.

2. Infrastructure as Code
Everything in my Jenkinsfile is version-controlled. No manual configurations that can be lost.

3. Security First

  • SSL encryption via Let’s Encrypt
  • Jenkins accessible only through Nginx reverse proxy
  • Port 8080 blocked from internet (localhost only)
  • Matrix-based authorization with read-only public access

4. Test Thoroughly
30 unit tests covering edge cases, error handling, and concurrent requests. Testing isn’t optional β€” it’s your safety net.

5. Document Everything
Created comprehensive guides for setup, troubleshooting, and interview prep. Future you will thank present you.

β€” -

πŸŽ“ Technologies Used

Backend: Python 3.12, Flask 3.0
Testing: pytest, pytest-cov (92% coverage)
CI/CD: Jenkins 2.528, Groovy
Cloud: AWS EC2 (Ubuntu 24.04)
Web Server: Nginx (reverse proxy + SSL)
Security: Let’s Encrypt SSL, AWS Security Groups
Version Control: Git, GitHub webhooks
Automation: Bash scripting, Python venv

β€” -

πŸ’Ό Impact Metrics

⚑ 50% deployment time reduction (10 min β†’ 5 min)
πŸ§ͺ 92% code coverage with 30 comprehensive tests
πŸš€ 40+ releases/year capability through automation
☁️ Production-ready AWS deployment with SSL
πŸ’° Cost-effective (~$12/month for full stack)
πŸ”’ Zero security incidents β€” proper auth & encryption

β€” -
Let’s connect! I’m happy to share knowledge, discuss opportunities, or help others on their DevOps journey.
πŸ”— Portfolio: https://github.com/sushilkumarsb, https://www.linkedin.com/in/sushilkumarsb/

β€” -

P.S. The entire project is open source! Check out my GitHub for the code, documentation, and detailed setup guides. Feel free to fork, learn, and ask questions. We all grow together. 🌱

If this helped you or inspired your own CI/CD journey, I’d love to hear about it in the comments!

#DevOps #Jenkins #CICD #AWS #CloudComputing #Automation #Python #SRE #CloudEngineer #InfrastructureAsCode

Top comments (0)