name: automating-devops
description: DevOps knowledge reference covering Git workflows, testing strategies, DevSecOps, release pipeline orchestration (release.yml, multi-arch images, cosign integration), CI/CD pipelines, database management, observability, and performance optimization. Use when working with Git, CI/CD, release pipelines, ghcr image publishing, testing, monitoring, or infrastructure automation.
user-invocable: false
炼器秘典 · DevOps
路由
CI/CD 管道模式
| 阶段 |
动作 |
工具示例 |
| Commit |
lint + unit test + SAST |
ESLint、pytest、Semgrep |
| Build |
构建 + 镜像打包 |
Docker、Buildpacks |
| Test |
集成测试 + E2E |
Playwright、k6 |
| Security |
DAST + 依赖扫描 + 密钥检测 |
OWASP ZAP、Trivy、gitleaks |
| Deploy |
渐进发布(canary/blue-green) |
ArgoCD Rollouts、Flagger |
| Verify |
冒烟测试 + SLO 校验 |
Prometheus、Grafana |
| Rollback |
自动回滚(SLO 违约) |
ArgoCD、Helm rollback |
原则
自动化一切 | 快速反馈(<10min) | 主干开发短分支 | 不可变制品 | 环境即代码