快速开始
一键运行(推荐)
bash
# 1. 设置 Token
export CNB_TOKEN="your_cnb_token_here"
# 2. 一键运行
bash pipeline.sh -p my-project流水线会自动:创建仓库 → 派 NPC → 转移仓库 → 验收 → 部署。
从手动 7 步迁移到一键脚本
如果你已习惯 master 的「7步手动」流程:
| 旧习惯 | 新做法 |
|---|---|
手动修改占位符 {项目名} | 修改 pipeline.config.yml 的 project.name |
| 手动 curl 创建/转移仓库 | pipeline.sh 自动处理 |
| 手动 curl 开 Issue | pipeline.sh 自动开 Issue + 派 NPC |
| 手动等待 NPC | pipeline.sh 自动轮询 + 超时重试 |
| 手动验收 checklist | verify-stage.sh 自动跑 30+ 项检查 |
快速上手:
bash
export CNB_TOKEN="your_token"
vim pipeline.config.yml # 改 project.name
bash pipeline.sh -p my-project # 一键跑随时可回退到手动模式——pipeline.sh 不改变仓库状态,只是帮你省掉重复的 curl。
断点续跑
如果流水线中断,再次运行同一项目名会自动检测断点:
bash
bash pipeline.sh -p my-project
# → 检测到断点,自动从上次中断处继续也可手动指定起始工位:
bash
bash pipeline.sh -p my-project -s frontend # 从前端工位开始常用选项
| 选项 | 说明 |
|---|---|
-p <项目名> | 项目名(必填) |
-c <配置文件> | 自定义配置文件路径 |
-s <工位> | 从指定工位开始(prd/ui/frontend/backend/admin/integration/deploy) |
--skip-verify | 跳过验收检查 |
--model <模型> | 覆盖所有工位的 NPC 模型 |
手动模式
如果不想用自动化脚本,也可以手动逐步操作。详见 manual-pipeline.md。