Loading...
Loading...
Compare original and translation side by side
| Term | Definition |
|---|---|
| workflow | A CI/CD pipeline definition file (.github/workflows/*.yml, .gitlab-ci.yml) |
| job | A named unit of work within a workflow containing one or more steps |
| step | A single action within a job (run command, uses action) |
| stage | A logical grouping of jobs (build, test, deploy) |
| artifact | Build output passed between jobs or stages |
| cache | Dependency/build cache persisted across runs to reduce build time |
| matrix | Parameterized job expansion across multiple configurations |
| concurrency group | Mutual exclusion mechanism preventing parallel runs |
| environment | Deployment target with protection rules (staging, production) |
| promotion | Moving artifacts through environments (dev -> staging -> prod) |
| rollback | Reverting a deployment to a previous known-good state |
| canary | Incremental traffic shift to new version (1% -> 5% -> 25% -> 100%) |
| blue/green | Two identical environments with instant traffic switch |
| rolling | Gradual instance-by-instance replacement |
| gate | Manual or automated approval checkpoint before deployment proceeds |
| runner | Execution environment for CI/CD jobs (GitHub-hosted, self-hosted) |
| reusable workflow | Callable workflow template invoked from other workflows |
| composite action | Multi-step action packaged as a single reusable unit |
| 术语(Term) | 定义(Definition) |
|---|---|
| workflow | CI/CD流水线定义文件(.github/workflows/*.yml、.gitlab-ci.yml) |
| job | 工作流中包含一个或多个步骤的命名工作单元 |
| step | 任务中的单个操作(运行命令、使用action) |
| stage | 任务的逻辑分组(构建、测试、部署) |
| artifact | 在任务或阶段之间传递的构建输出物 |
| cache | 跨运行持久化的依赖/构建缓存,用于缩短构建时间 |
| matrix | 跨多种配置的参数化任务扩展 |
| concurrency group | 防止并行运行的互斥机制 |
| environment | 带有保护规则的部署目标(预发布环境、生产环境) |
| promotion | 将构建产物在环境间迁移(开发 -> 预发布 -> 生产) |
| rollback | 将部署回滚到之前已知的稳定状态 |
| canary | 逐步将流量切换到新版本(1% -> 5% -> 25% -> 100%) |
| blue/green | 两个完全相同的环境,可实现流量即时切换 |
| rolling | 逐个实例逐步替换的部署方式 |
| gate | 部署前的手动或自动审批检查点 |
| runner | CI/CD任务的执行环境(GitHub托管、自托管) |
| reusable workflow | 可被其他工作流调用的工作流模板 |
| composite action | 打包为单个可复用单元的多步骤action |
| $ARGUMENTS | Mode |
|---|---|
| Generate: new CI/CD workflow from requirements |
| Action: GitHub Action step/job generation |
| Optimize: pipeline build time optimization |
| Deploy: deployment strategy design |
| Review: audit existing pipeline |
| Debug: analyze CI failure logs |
| Natural language about CI/CD | Auto-detect appropriate mode |
| Empty | Show mode menu with examples |
| 参数($ARGUMENTS) | 模式(Mode) |
|---|---|
| 生成:根据需求创建新的CI/CD工作流 |
| Action:生成GitHub Action步骤/任务 |
| 优化:优化流水线构建时间 |
| 部署:设计部署策略 |
| 审核:检查现有流水线 |
| 调试:分析CI失败日志 |
| 关于CI/CD的自然语言描述 | 自动检测匹配的模式 |
| 空输入 | 显示模式菜单及示例 |
pipelinepipelinereferences/github-actions-patterns.mdreferences/gitlab-ci-patterns.mduv run python scripts/workflow-analyzer.py <file>references/github-actions-patterns.mdreferences/gitlab-ci-patterns.mduv run python scripts/workflow-analyzer.py <file>actionactionreferences/github-actions-patterns.mduseswithenvreferences/github-actions-patterns.mduseswithenvoptimizeoptimizeuv run python scripts/workflow-analyzer.py <workflow>uv run python scripts/pipeline-cost-estimator.py <workflow>references/pipeline-optimization.mduv run python scripts/workflow-analyzer.py <workflow>uv run python scripts/pipeline-cost-estimator.py <workflow>references/pipeline-optimization.mddeploydeployreferences/deployment-strategies.md| Factor | Blue/Green | Canary | Rolling |
|---|---|---|---|
| Rollback speed | Instant | Fast | Slow |
| Resource cost | 2x | 1.1-1.5x | 1x |
| Risk exposure | None (pre-switch) | Gradual | Gradual |
| Complexity | Medium | High | Low |
| Best for | Critical services | High-traffic APIs | Cost-sensitive apps |
references/deployment-strategies.md| 评估因素 | 蓝绿部署(Blue/Green) | 金丝雀部署(Canary) | 滚动部署(Rolling) |
|---|---|---|---|
| 回滚速度 | 即时 | 快速 | 缓慢 |
| 资源成本 | 2倍 | 1.1-1.5倍 | 1倍 |
| 风险暴露 | 无(切换前) | 逐步增加 | 逐步增加 |
| 复杂度 | 中等 | 高 | 低 |
| 适用场景 | 核心关键服务 | 高流量API | 成本敏感型应用 |
reviewreviewuv run python scripts/workflow-analyzer.py <workflow>references/pipeline-review-checklist.mduv run python scripts/workflow-analyzer.py <workflow>references/pipeline-review-checklist.mddebugdebuguv run python scripts/log-parser.py <logfile>references/ci-failure-triage.md| Category | Examples | Common Fixes |
|---|---|---|
| dependency | Version conflict, missing package, registry timeout | Pin versions, add retry, use cache |
| build | Compilation error, type error, out of memory | Fix code, increase runner memory |
| test | Assertion failure, flaky test, timeout | Fix test, add retry for flaky, increase timeout |
| lint | Format violation, rule violation | Run formatter, update config |
| deploy | Permission denied, health check fail, resource limit | Fix permissions, check config, scale resources |
uv run python scripts/log-parser.py <logfile>references/ci-failure-triage.md| 故障类别 | 示例 | 常见修复方案 |
|---|---|---|
| 依赖问题 | 版本冲突、缺失包、镜像仓库超时 | 固定版本、添加重试、使用缓存 |
| 构建问题 | 编译错误、类型错误、内存不足 | 修复代码、增加runner内存 |
| 测试问题 | 断言失败、不稳定测试、超时 | 修复测试、为不稳定测试添加重试、增加超时时间 |
| 代码规范问题 | 格式违规、规则违反 | 运行格式化工具、更新配置 |
| 部署问题 | 权限拒绝、健康检查失败、资源限制 | 修复权限、检查配置、扩容资源 |
| File | Content | Read When |
|---|---|---|
| Workflow patterns, reusable workflows, composite actions, security hardening | Generate, Action, Review modes |
| GitLab CI pipeline patterns, includes, rules, environments | Generate mode (GitLab) |
| Blue/green, canary, rolling strategies with comparison and rollback | Deploy mode |
| Caching, parallelization, selective runs, matrix optimization | Optimize mode |
| Security, reliability, performance, maintainability, cost checklists | Review mode |
| Error category taxonomy, root cause patterns, fix recipes | Debug mode |
| Artifact passing, retention, environment promotion patterns | Generate, Deploy modes |
| Script | When to Run |
|---|---|
| Analyze workflow structure, detect issues, find optimization opportunities |
| Estimate CI minutes and identify cost savings |
| Extract actionable errors from CI failure logs |
| Template | When to Render |
|---|---|
| After analysis -- inject pipeline health data into the dashboard |
| 文件路径 | 内容 | 加载时机 |
|---|---|---|
| 工作流模式、可复用工作流、复合action、安全加固 | 生成、Action、审核模式 |
| GitLab CI流水线模式、includes、rules、environments | 生成模式(GitLab平台) |
| 蓝绿、金丝雀、滚动部署策略的对比及回滚方案 | 部署模式 |
| 缓存、并行化、选择性运行、matrix优化 | 优化模式 |
| 安全性、可靠性、性能、可维护性、成本审核清单 | 审核模式 |
| 错误类别分类、根本原因模式、修复方案 | 调试模式 |
| 产物传递、保留、环境迁移模式 | 生成、部署模式 |
| 脚本 | 运行时机 |
|---|---|
| 分析工作流结构、检测问题、寻找优化机会 |
| 估算CI运行时长、识别成本节约点 |
| 从CI失败日志中提取可操作的错误信息 |
| 模板 | 渲染时机 |
|---|---|
| 分析完成后 -- 将流水线健康数据注入仪表盘 |
uses: actions/checkout@<sha>pull_request_targetactions/checkoutpermissions${{ secrets.NAME }}concurrencytimeout-minutesruns-on: self-hostedworkflow-analyzer.pyuses: actions/checkout@<sha>pull_request_targetactions/checkoutpermissions${{ secrets.NAME }}concurrencytimeout-minutesruns-on: self-hostedworkflow-analyzer.py