| name | ci-cd |
| description | Design and maintain automated continuous integration and delivery pipelines. |
Skill: CI/CD Pipeline Design
Category: DevOps
Priority: High
Description
Design and maintain automated continuous integration and delivery pipelines.
Purpose
Automate testing, building, and deployment to reduce human error and increase velocity.
Trigger
Use this skill when:
- Setting up a new project
- Adding automated tests
- Configuring deployment automation
- Adding security scanning to pipelines
- Optimizing build times
Context
- Version control system
- Deployment targets (cloud, on-premise, edge)
- Testing frameworks
- Security requirements
- Team size and expertise
Workflow
- Fast Feedback Loop - Run unit tests first, fast.
- Parallel Jobs - Run independent checks concurrently.
- Cache Dependencies - Do not download the internet every build.
- Artifact Management - Version and store build artifacts.
- Security Scanning - SAST, DAST, dependency audit in pipeline.
- Environment Promotion - Same artifact through dev, staging, prod.
- Rollback Strategy - One-click rollback must be possible.
- Notifications - Alert on failure, not just success.
Examples
Good Pipeline Stages
stages:
- lint
- test
- security-scan
- build
- deploy-staging
- e2e-staging
- deploy-prod
rules:
- deploy-prod only if: main branch AND e2e-staging passed
Bad Pipeline Design
stage: all
script:
- npm install
- npm test
- npm build
- docker build
- docker push
- ssh deploy
Anti-patterns
- No automated tests in pipeline
- Deploying without verification
- Building different artifacts per environment
- Secrets in pipeline configuration
- No rollback capability
Verification
References