๐Cisco DevNet Associate (200-901 DEVASC)
A CI/CD pipeline is a set of automated steps that allow developers to build, test, and deploy applications efficiently and reliably. CI/CD stands for:
- CI โ Continuous Integration: Developers frequently merge their code changes into a central repository, where automated builds and tests happen.
- CD โ Continuous Delivery / Continuous Deployment: After testing, the application is automatically deployed to a production or pre-production environment. Continuous Delivery requires manual approval before production deployment, while Continuous Deployment goes automatically.
The CI/CD pipeline has several key components:
1. Source Code Repository
- This is where the application code is stored and managed.
- Examples: GitHub, GitLab, Bitbucket.
- It keeps track of all code changes, who made them, and when.
- Role in CI/CD: The pipeline monitors the repository and triggers builds whenever new code is committed.
Exam tip: Know that version control systems are the starting point of CI/CD.
2. Build Server / Automation Tool
- This component automatically compiles or packages the code into a runnable format.
- Examples: Jenkins, GitLab CI/CD, CircleCI.
- What happens here:
- Code is compiled.
- Dependencies (external libraries the code needs) are installed.
- Artifacts (the final compiled code or packages) are prepared for testing.
- Benefit: Removes manual errors from the build process and ensures consistency.
Exam tip: Build servers are responsible for creating reliable, repeatable builds.
3. Automated Testing
- Automated tests check if the application works correctly before deployment.
- Types of tests:
- Unit tests โ Check individual pieces of code.
- Integration tests โ Check if different parts of the application work together.
- End-to-end tests โ Check if the full application behaves correctly from start to finish.
- Tools: Selenium, JUnit, PyTest.
- Benefit: Finds bugs early, ensures high-quality code.
Exam tip: Testing is a crucial part of CI; it ensures code changes donโt break existing functionality.
4. Artifact Repository
- A place to store the build outputs (artifacts) safely for deployment.
- Examples: Nexus, Artifactory.
- Why itโs important:
- Keeps a record of all builds.
- Makes deployments reproducible and consistent.
- Artifacts can include compiled code, Docker images, or configuration files.
Exam tip: CI/CD relies on storing artifacts to deploy the same version of the code across environments.
5. Deployment / Delivery Component
- Handles moving the application from testing environments to production.
- Continuous Delivery: Deployment requires a manual approval step.
- Continuous Deployment: Deployment happens automatically after passing tests.
- Tools: Kubernetes, Ansible, Docker, Helm.
- Benefit: Reduces human errors and speeds up delivery.
Exam tip: Know the difference between Continuous Delivery (manual approval) and Continuous Deployment (fully automatic).
6. Monitoring & Feedback
- After deployment, the applicationโs performance is monitored.
- Tools: Prometheus, Grafana, ELK Stack.
- Purpose:
- Detect bugs, errors, or performance issues.
- Provide feedback to developers for improvements.
- Monitoring completes the CI/CD cycle and allows iterative development.
Exam tip: Feedback loops help maintain application quality over time.
7. Pipeline Orchestration
- The orchestration layer connects all the components and defines the flow.
- Determines the sequence: Code โ Build โ Test โ Artifact โ Deploy โ Monitor.
- Tools: Jenkins Pipelines, GitLab Pipelines, Tekton.
- Benefit: Automates the entire process, reduces manual intervention.
Exam tip: Pipelines define โwhat happens and whenโ in CI/CD.
Quick Summary Table for Exam
| Component | Purpose | Example Tools |
|---|---|---|
| Source Code Repository | Store and track code changes | GitHub, GitLab, Bitbucket |
| Build Server / Automation | Compile/package code and create artifacts | Jenkins, GitLab CI, CircleCI |
| Automated Testing | Verify code correctness | JUnit, Selenium, PyTest |
| Artifact Repository | Store build outputs for deployment | Nexus, Artifactory |
| Deployment / Delivery | Move application to environments | Kubernetes, Ansible, Docker |
| Monitoring & Feedback | Observe performance and report issues | Prometheus, Grafana, ELK |
| Pipeline Orchestration | Automate the flow of CI/CD steps | Jenkins Pipeline, Tekton |
Key Points to Remember for the Exam
- CI/CD automates integration, testing, and deployment of applications.
- The pipeline starts with code commits in a repository.
- Automated builds and tests reduce errors and speed up development.
- Artifacts ensure reproducible deployments.
- Deployment can be manual (Continuous Delivery) or automatic (Continuous Deployment).
- Monitoring and feedback complete the cycle and help maintain quality.
- Pipeline orchestration tools glue everything together.
