🔧 What is Jenkins?
Jenkins is an open-source automation server used to implement Continuous Integration (CI) and Continuous Delivery/Deployment (CD). It helps developers automate the process of building, testing, and deploying code.
🧩 Key Concepts
✅ Continuous Integration (CI)
- Developers regularly commit code to a shared repository.
- Jenkins automatically builds and tests code after each commit.
- Helps catch bugs early and ensures code stability.
🚀 Continuous Delivery/Deployment (CD)
- Once the code is tested successfully, Jenkins can automatically deploy it to staging or production environments.
- Ensures faster and more reliable releases.
⚙️ How Jenkins Works
- Source Code Management (SCM): Connects to GitHub, GitLab, Bitbucket, etc.
- Build Triggers: Automatically runs when code is pushed, on a schedule, or manually triggered.
- Build Pipeline: Executes a series of steps (build, test, deploy).
- Plugins: 1000+ plugins to integrate with tools like Docker, Kubernetes, Maven, Slack, etc.
📦 Jenkins Pipeline (Scripted or Declarative)
A pipeline defines your CI/CD process as code (Jenkinsfile), example: