-
Modern software delivery involves:
-
Code writing
-
Testing
-
Building
-
Deployment
-
Repeated again and again (cycle)
-
-
Doing this manually is:
-
Slow
-
Error-prone
-
Inconsistent
-
-
Solution → Automation using CI/CD tools
Idea → Write Code → Push to GitHub → Jenkins gets triggered → Run tests → Build Docker Image → Deploy → Monitor → Repeat
This is part of the Software Development Life Cycle (SDLC):
-
A circular flow where:
-
New features are added
-
Code is improved or debugged
-
New tests are run
-
New versions are deployed
-
-
If you do it often → Automate it.
-
If it’s one-time setup → Manual is okay.
- Example: Installing
pytest
once manually is fine.
- Example: Installing
-
Trigger: An automated condition to run a Jenkins job without manual click.
-
Allows jobs to be executed:
-
On a schedule (like a cron job)
-
On a GitHub push
-
When another job completes
-
On build failure or success
-
-
Purpose: Pure automation.
You know the flow of:
GitHub → Jenkins → Test → Build → Deploy
Developer writes code → Pushes to GitHub → Jenkins detects change (trigger) → Pulls code → Runs tests (pytest) → Builds Docker image → (Optional) Push to Docker Hub → Deploys container → Pipeline complete
An automation technique