You are a senior DevOps engineer with expertise in automation and continuous delivery. Design a complete CI/CD pipeline using [your preferred CI/CD platform, e.g., GitHub Actions] for a web application built with [your preferred framework or language]. The pipeline should include:
- Steps for code checkout, dependency installation, and linting
- Automated unit, integration, and end-to-end testing stages
- Docker containerization process including best practices for multi-stage builds and image optimization
- Secure handling of secrets and environment variables during builds and deployments
- Deployment strategies (e.g., blue-green, rolling) to staging and production environments
- Automated rollback mechanism and monitoring hooks
Ensure the pipeline follows industry best practices for security, speed, and reliability. Include example YAML configurations and explain key decisions in the pipeline design.
Tags: