feat: add v0.1 gitops ci templates

This commit is contained in:
Codex
2026-05-29 11:14:59 +08:00
parent 5deb9fa7fd
commit 4579330462
13 changed files with 760 additions and 16 deletions
+10 -8
View File
@@ -5,11 +5,11 @@
## 设计目标
- `v0.1` 是独立 lane,不复用 `agentrun_dev``agentrun_prod` 作为当前运行面。
- 每条版本 lane 拥有独立 source branch、source workspace、GitOps branch、runtime namespace、artifact catalog、runtime path、CI pipeline 和发布验收。
- 每条版本 lane 拥有独立 source branch、source worktree、GitOps branch、runtime namespace、artifact catalog、runtime path、CI pipeline 和发布验收。
- `v0.1` 只能部署到 `agentrun-v01` namespace`v0.2``v0.3` 后续使用自己的 namespace 和 GitOps 路径。
- CI/CD 必须使用 G14 原生 k3s、纯 Tekton Pipeline/Task/PipelineRun 和 Argo CD;不得引入自定义 runner、CI.json runner、长期自研 poller/reconciler、D601 legacy、临时 clone、手工 Pod patch 或本地镜像作为发布真相。
- `v0.1` 的 CD 唯一手写真相源是 source branch 内的 `deploy/deploy.json`Tekton 生成的 artifact catalog 和 Argo desired state 必须与 source branch 分离,只写入 `v0.1-gitops`
- 发布证据以 live runtime、Argo desired state、GitOps branch、Tekton 证据和干净 source workspace 顺序判断。
- 发布证据以 live runtime、Argo desired state、GitOps branch、Tekton 证据和干净 source worktree 顺序判断。
## 固定命名
@@ -17,7 +17,7 @@
| --- | --- |
| Source repo | `git@github.com:pikasTech/agentrun.git` |
| Source branch | `v0.1` |
| Source workspace | `G14:/root/agentrun-v01` |
| Source worktree | `G14:/root/agentrun-v01` |
| Worktree root | `G14:/root/agentrun-v01/.worktree/{task}` |
| Runtime namespace | `agentrun-v01` |
| GitOps branch | `v0.1-gitops` |
@@ -34,7 +34,9 @@
## Bun + TypeScript CI 边界
`v0.1` 自研代码的 CI/CD 工具链以 Bun + TypeScript 为准。Tekton task 必须在受控容器内安装或使用固定 Bun 运行时,执行依赖安装、类型检查、自测试和镜像构建;不得把 master server、G14 固定 source workspace 或手工 host shell 作为构建机。
`v0.1` 自研代码的 CI/CD 工具链以 Bun + TypeScript 为准。Tekton task 必须在受控容器内安装或使用固定 Bun 运行时,执行依赖安装、类型检查、自测试和镜像构建;不得把 master server、G14 固定 source worktree 或手工 host shell 作为构建机。
G14 依赖拉取和镜像发布沿用 HWLAB 成熟 lane 的运行面假设:`PipelineRun.spec.taskRunTemplate.podTemplate.hostNetwork=true``dnsPolicy=ClusterFirstWithHostNet`。因此 Tekton task 内的 `127.0.0.1:10808` 指向 G14 host bootstrap proxy`127.0.0.1:5000` 指向 G14 host-managed registry`NO_PROXY` 必须保留 `hyueapi.com``.hyueapi.com`、cluster service CIDR、`.svc``.cluster.local`。如果未来改成 cluster Service proxy 或 registry DNS,必须同步更新 Tekton template、render 脚本和本文规格,不得只改某个 PipelineRun 实例。
CI 的最小检查应覆盖:
@@ -53,9 +55,9 @@ CI 的最小检查应覆盖:
2. Argo desired state`argocd/agentrun-g14-v01` 的 revision、sync、health、source branch 和 runtime path。
3. GitOps branch`v0.1-gitops` 中的 `deploy/artifact-catalog.v01.json``deploy/gitops/g14/runtime-v01/**`
4. Tekton 执行证据:PipelineRun、TaskRun result、image digest 和 promotion 终态。
5. 干净 source workspace`G14:/root/agentrun-v01``origin/v0.1`、render 脚本、deploy intent 和 `--no-write` 输出。
5. 干净 source worktree`G14:/root/agentrun-v01``origin/v0.1`、render 脚本、deploy intent 和 `--no-write` 输出。
`master` 记忆、`/root/agentrun` 固定工作区`agentrun_dev``agentrun_prod`、D601 legacy 路径、临时 worktree 或本地容器只能作为线索,不能作为 `v0.1` 发布通过证据。
`master` 记忆、`/root/agentrun` 历史固定目录`agentrun_dev``agentrun_prod`、D601 legacy 路径、临时 worktree 或本地容器只能作为线索,不能作为 `v0.1` 发布通过证据。
## Source 与 GitOps 分层
@@ -140,7 +142,7 @@ Tekton promotion 可以读取 `deploy/deploy.json` 来 render runtime desired st
## 验收标准
- `G14:/root/agentrun-v01``v0.1...origin/v0.1` 且 clean。
- `G14:/root/agentrun-v01` source worktree`v0.1...origin/v0.1` 且 clean。
- `AGENTS.md``docs/reference/` 不得把 `agentrun_dev``agentrun_prod` 写成 `v0.1` 当前 namespace、Argo destination、Pipeline target 或验收目标;只允许在废弃说明和历史背景中提及。
- `agentrun-v01` namespace 存在,且 `agentrun_dev`/`agentrun_prod` 不参与 `v0.1` 发布判定。
- `v0.1-gitops` branch 和 `deploy/gitops/g14/runtime-v01` 成为 Argo desired state 来源。
@@ -154,7 +156,7 @@ Tekton promotion 可以读取 `deploy/deploy.json` 来 render runtime desired st
| 规格项 | 状态 | 说明 |
| --- | --- | --- |
| `v0.1` source branch | 已建立 | `origin/v0.1` 存在。 |
| `G14:/root/agentrun-v01` workspace | 已建立 | 固定工作区使用 `v0.1` 分支。 |
| `G14:/root/agentrun-v01` source worktree | 已建立 | 固定 source worktree 使用 `v0.1` 分支。 |
| `agentrun-v01` namespace | 未实现 | 需要后续初始化。 |
| `v0.1-gitops` branch | 未实现 | 需要后续初始化。 |
| 纯 Tekton/Argo lane | 未实现 | 需要后续按本文补齐;不得引入自定义 runner。 |