This project demonstrates a complete CI/CD pipeline setup using Jenkins for a simple Node.js application.
It’s designed to help:
- 🧑💻 DevOps beginners
- 🧪 Students
- 🎯 Interview candidates
💡 While the app is intentionally simple, the goal is to learn Jenkins automation, Docker containerization, and real-world DevOps flow — essential for junior DevOps roles.
✅ Connect Jenkins to a GitHub repo
✅ Automate builds, tests, and deployments using a Jenkinsfile
✅ Containerize apps using Docker
✅ Trigger builds via GitHub push or Jenkins UI
| Tool | Purpose |
|---|---|
| Node.js | Application Runtime |
| npm | Dependency Management |
| Jenkins | Continuous Integration Tool |
| Docker | Containerization |
| GitHub | Source Code Hosting |
git clone https://github.com/<YOUR-USERNAME>/<YOUR-REPO-NAME>.git
cd <YOUR-REPO-NAME>npm install
npm start🔗 Visit: http://localhost:3000
docker build -t simple-node-app .
docker run -p 3000:3000 simple-node-appGitHub Push ➜ Jenkins Trigger ➜ Checkout ➜ Install ➜ Test ➜ Docker Build ➜ Run ContainerCheckout Pull latest code from GitHub
Install Run npm install to install dependencies
Test Run tests using npm test (
⚠️ Test failures won’t stop pipeline (|| true used) )
Docker Build Build Docker image from Dockerfile
Run Container Deploy container on port 3000
- Install Jenkins on your system or use Docker.
- Install required plugins:
-
✅ Docker Pipeline
-
✅ Git
-
✅ NodeJS
- Configure Jenkins:
-
Connect Jenkins to your GitHub repository
-
Create a new Pipeline job and point it to this repo
-
Ensure Jenkins agent can run Docker
-
Automatically: via GitHub webhook or SCM polling
-
Manually: use “Build Now” in Jenkins UI