@numa-tech/numa 1.14.28 → 1.14.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -201
- package/dist/application-onboarding/client.d.ts +3 -17
- package/dist/application-onboarding/client.js +1 -14
- package/dist/application-onboarding/client.js.map +1 -1
- package/dist/application-onboarding/commands.d.ts +0 -2
- package/dist/application-onboarding/commands.js +5 -76
- package/dist/application-onboarding/commands.js.map +1 -1
- package/dist/application-onboarding/schemas.d.ts +28 -301
- package/dist/application-onboarding/schemas.js +13 -91
- package/dist/application-onboarding/schemas.js.map +1 -1
- package/dist/cli.js +0 -2
- package/dist/cli.js.map +1 -1
- package/dist/command-catalog.js +6 -336
- package/dist/command-catalog.js.map +1 -1
- package/dist/gitops/client.d.ts +0 -38
- package/dist/gitops/client.js +1 -9
- package/dist/gitops/client.js.map +1 -1
- package/dist/gitops/commands.js +1 -20
- package/dist/gitops/commands.js.map +1 -1
- package/dist/gitops/schemas.d.ts +0 -112
- package/dist/gitops/schemas.js +0 -38
- package/dist/gitops/schemas.js.map +1 -1
- package/dist/jenkins/commands.d.ts +0 -4
- package/dist/jenkins/commands.js +0 -10
- package/dist/jenkins/commands.js.map +1 -1
- package/dist/jenkins-jobs/commands.d.ts +0 -2
- package/dist/jenkins-jobs/commands.js +0 -2
- package/dist/jenkins-jobs/commands.js.map +1 -1
- package/dist/pipeline/commands.js +0 -2
- package/dist/pipeline/commands.js.map +1 -1
- package/dist/platform-profile.d.ts +2 -0
- package/dist/platform-profile.js +2 -1
- package/dist/platform-profile.js.map +1 -1
- package/package.json +4 -4
- package/skills/numa-create-application/SKILL.md +30 -163
- package/skills/numa-create-application/agents/openai.yaml +2 -2
- package/skills/numa-create-application/evals/evals.json +9 -150
- package/skills/numa-create-application/references/checklist.md +22 -139
- package/skills/numa-create-application/references/numa-cli.md +27 -257
- package/skills/numa-create-application/references/promote-workflows.md +22 -188
- package/skills/numa-create-application/scripts/inspect-project.mjs +1 -1
- package/skills/numa-jenkins-deployment/SKILL.md +21 -132
- package/skills/numa-jenkins-deployment/agents/openai.yaml +2 -2
- package/skills/numa-jenkins-deployment/evals/evals.json +9 -59
- package/skills/numa-jenkins-deployment/references/cli-contract.md +22 -101
- package/skills/numa-jenkins-deployment/references/diagnostics.md +2 -2
- package/skills/numa-jenkins-deployment/references/release-policy.md +19 -85
- package/skills/numa-local-flux-deploy/SKILL.md +1 -1
- package/skills/numa-local-flux-deploy/references/local-flux-release.md +1 -1
- package/dist/integration-bootstrap/client.d.ts +0 -61
- package/dist/integration-bootstrap/client.js +0 -293
- package/dist/integration-bootstrap/client.js.map +0 -1
- package/dist/integration-bootstrap/commands.d.ts +0 -86
- package/dist/integration-bootstrap/commands.js +0 -615
- package/dist/integration-bootstrap/commands.js.map +0 -1
- package/dist/integration-bootstrap/schemas.d.ts +0 -831
- package/dist/integration-bootstrap/schemas.js +0 -565
- package/dist/integration-bootstrap/schemas.js.map +0 -1
- package/dist/jenkins-gitops-rollouts/client.d.ts +0 -197
- package/dist/jenkins-gitops-rollouts/client.js +0 -126
- package/dist/jenkins-gitops-rollouts/client.js.map +0 -1
- package/dist/jenkins-gitops-rollouts/commands.d.ts +0 -50
- package/dist/jenkins-gitops-rollouts/commands.js +0 -358
- package/dist/jenkins-gitops-rollouts/commands.js.map +0 -1
- package/dist/jenkins-gitops-rollouts/schemas.d.ts +0 -217
- package/dist/jenkins-gitops-rollouts/schemas.js +0 -131
- package/dist/jenkins-gitops-rollouts/schemas.js.map +0 -1
- package/dist/platform-build-job-replans/client.d.ts +0 -291
- package/dist/platform-build-job-replans/client.js +0 -148
- package/dist/platform-build-job-replans/client.js.map +0 -1
- package/dist/platform-build-job-replans/commands.d.ts +0 -6
- package/dist/platform-build-job-replans/commands.js +0 -373
- package/dist/platform-build-job-replans/commands.js.map +0 -1
- package/dist/platform-build-job-replans/schemas.d.ts +0 -147
- package/dist/platform-build-job-replans/schemas.js +0 -151
- package/dist/platform-build-job-replans/schemas.js.map +0 -1
- package/dist/platform-build-rollouts/client.d.ts +0 -346
- package/dist/platform-build-rollouts/client.js +0 -153
- package/dist/platform-build-rollouts/client.js.map +0 -1
- package/dist/platform-build-rollouts/commands.d.ts +0 -98
- package/dist/platform-build-rollouts/commands.js +0 -465
- package/dist/platform-build-rollouts/commands.js.map +0 -1
- package/dist/platform-build-rollouts/schemas.d.ts +0 -348
- package/dist/platform-build-rollouts/schemas.js +0 -257
- package/dist/platform-build-rollouts/schemas.js.map +0 -1
- package/dist/platform-builds/client.d.ts +0 -147
- package/dist/platform-builds/client.js +0 -115
- package/dist/platform-builds/client.js.map +0 -1
- package/dist/platform-builds/commands.d.ts +0 -7
- package/dist/platform-builds/commands.js +0 -226
- package/dist/platform-builds/commands.js.map +0 -1
- package/dist/platform-builds/schemas.d.ts +0 -127
- package/dist/platform-builds/schemas.js +0 -66
- package/dist/platform-builds/schemas.js.map +0 -1
|
@@ -1,147 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: numa-jenkins-deployment
|
|
3
|
-
description: 使用 Numa CLI 安全规划、执行、监控、诊断和恢复 MCI DevOps/Jenkins
|
|
3
|
+
description: 使用 Numa CLI 安全规划、执行、监控、诊断和恢复 MCI DevOps/Jenkins canonical Multibranch 流水线部署。用户要求部署、发布、上线、重新部署、回滚,或排查 pipeline build/builds/status/log/retry/stop、Jenkins 构建、GitOps 写入和运行态时必须使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Numa Jenkins Deployment
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
通过标准 `pipeline build` 表面执行仓库中的 `gitopsBuildEntry()`。已退役的签名快照、独立触发、rollout 和 provenance 命令不得使用;若旧服务仍返回这些 capability,只视为待清理的历史状态。
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## 工作流
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
1. 先读取 [references/release-policy.md](references/release-policy.md),确认本次请求授权的环境和动作。
|
|
13
|
+
2. 检查源码目录、分支、HEAD、remote、工作树和 `.numa/pipeline-release.json`。生产只发布干净且已推送的提交。
|
|
14
|
+
3. 使用 `numa pipeline inspect APPLICATION --json` 和 `numa pipeline list` 确认 application、tier、canonical Multibranch root、branch child 与参数定义。
|
|
15
|
+
4. 新分支 Job 第一次运行不带业务参数,作为参数初始化;需要强制重建参数时可传 `INIT=true`。初始化成功后必须用新的幂等键触发实际部署。
|
|
16
|
+
5. 实际构建使用 `numa pipeline build`,传明确的 `ENV_ID` 及项目必需参数。生产提供 `--approve-id` 或不少于 10 个字符的 `--production-reason`。
|
|
17
|
+
6. 保存 requestId。结果不明时只用 `pipeline status/log` 或 `pipeline builds` 找回原请求,不换 key 重放。
|
|
18
|
+
7. 完成必须同时核对:平台构建账本/Jenkins 结果、Flux 目标文件与提交、目标集群实际镜像和健康状态。
|
|
15
19
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
- 解释、review、状态查询或诊断保持只读;不触发、停止、重试或修改远程资源。
|
|
19
|
-
- 用户明确要求发布已解析的应用、tier 和 branch 后,可执行对应部署。新增目标、生产影响或 fallback 需要再次授权。
|
|
20
|
-
- 应用/Repository/Job 缺失时转入 `numa-create-application`;项目构建规范缺失且用户要求修复时使用 `mci-build-standards`。
|
|
21
|
-
- 不读取或输出 token cache、Bearer/Cookie、Jenkins/SCM credential、Kubernetes Secret 或数据库密码。
|
|
22
|
-
- v2 writer 结果未知时禁止直接改 Flux、数据库或 Jenkins 结果;本地 Flux 只是在正常流水线不可用且用户明确授权后的独立 fallback,不是账本修复器。
|
|
23
|
-
|
|
24
|
-
## 1. 建立运行时事实
|
|
25
|
-
|
|
26
|
-
1. 读取目标仓库的 `AGENTS.md`、部署文档和 `.numa/pipeline-release.json`。
|
|
27
|
-
2. 只用当前运行时帮助确定命令,不凭记忆猜参数:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
numa --version
|
|
31
|
-
numa commands --json
|
|
32
|
-
numa auth status --json
|
|
33
|
-
numa profile --json
|
|
34
|
-
numa pipeline --help
|
|
35
|
-
numa pipeline inspect APPLICATION --json
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
3. 记录 CLI 版本、profile/API origin、当前用户、tier、application、branch 和完整 remote commit。401/403 按身份/权限处理,不绕过服务端。
|
|
39
|
-
4. 判定 delivery mode:存在已验证的 platform-build rollout、server-owned writer 和 `pipeline platform-build` capability 时为 `PLATFORM_V2`;明确的 legacy binding 才为 `LEGACY_V1`。证据不足时停止,禁止猜测或降级。
|
|
40
|
-
|
|
41
|
-
## 2. 写操作前预检
|
|
42
|
-
|
|
43
|
-
按顺序核验:
|
|
44
|
-
|
|
45
|
-
1. **应用目录**:`numa app list --json` 中存在唯一 application;否则分类为 `APPLICATION_NOT_REGISTERED`。
|
|
46
|
-
2. **Jenkins 初始化**:Job、instance、inventory、binding 和目标 branch child 均存在且可构建。完整 multibranch 初始化还要有 INDEX_ONLY/NoTrigger scan 证据;只存在父 Job 或 `scanMode=NONE` 不代表 branch 已就绪。当前服务端在 SCM 分支与 Jenkinsfile 已验证、但 branch child 缺失时,会为同一部署操作自动执行一次安全索引并继续;不得另建影子 Job 或退回默认分支。
|
|
47
|
-
3. **v2 rollout**:`PLATFORM_V2` 必须证明 writer bootstrap、Job provenance、platform-build rollout/configure 为 exact `READY/JENKINS_API_VERIFIED/VERIFIED`,source/Jenkinsfile/build-profile/configuration digest 完整。不得用 legacy manual readiness 代替。
|
|
48
|
-
4. **源码与项目**:工作树干净,HEAD 等于目标远端;Jenkinsfile/build profile 和运行时入口符合该 delivery mode。不要 stash、提交或丢弃用户的无关修改。
|
|
49
|
-
5. **治理**:生产发布需要真实 approval ID 或服务端允许的具体 production reason;不能捏造审批,也不能通过普通参数传入。
|
|
50
|
-
|
|
51
|
-
## 3. 展示发布计划
|
|
52
|
-
|
|
53
|
-
触发前展示 CLI/profile/操作者、delivery mode、application 顺序、repository/branch/SHA、Jenkins Job/binding/rollout、preflight、审批、稳定 idempotency key,以及会发生和不会发生的写操作。首次构建、生产发布和 fallback 都是独立授权。
|
|
54
|
-
|
|
55
|
-
幂等键应稳定标识同一应用、同一源码和同一发布 intent,例如 `APPLICATION-COMMIT_SHA`。同一提交的未知结果复用原 key;真正的新发布才使用新 key。
|
|
56
|
-
|
|
57
|
-
## 4. 执行与观察
|
|
58
|
-
|
|
59
|
-
### PLATFORM_V2
|
|
60
|
-
|
|
61
|
-
按运行时 help 组装命令;v2 不接受任意 Jenkins 参数:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
numa pipeline platform-build trigger APPLICATION \
|
|
65
|
-
--tier TIER \
|
|
66
|
-
--branch BRANCH \
|
|
67
|
-
--idempotency-key APPLICATION-COMMIT_SHA \
|
|
68
|
-
--approve-id APPROVAL_ID \
|
|
69
|
-
--production-reason '具体生产发布原因' \
|
|
70
|
-
--yes --wait --json
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
只传策略真实要求的审批字段。Jenkins 负责构建/push 镜像并提交一次 image intent;Flux SCM CAS 由 DevOps server-owned writer 执行,Jenkins 不持有 Flux Git credential。
|
|
74
|
-
|
|
75
|
-
### LEGACY_V1
|
|
76
|
-
|
|
77
|
-
只有明确 legacy binding 才使用:
|
|
20
|
+
## 标准命令
|
|
78
21
|
|
|
79
22
|
```bash
|
|
80
|
-
numa pipeline build APPLICATION \
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
--approve-id APPROVAL_ID \
|
|
84
|
-
--production-reason '具体生产发布原因' \
|
|
85
|
-
--idempotency-key APPLICATION-COMMIT_SHA \
|
|
86
|
-
--wait --json
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
多个应用严格串行;前一个只有平台终态和所需运行态验证均通过后才启动下一个。等待期间至少每分钟给用户一次状态。中断本地观察不会自动停止远端任务。
|
|
90
|
-
|
|
91
|
-
## 5. 未知结果与安全恢复
|
|
23
|
+
numa pipeline build APPLICATION --tier production --branch BRANCH \
|
|
24
|
+
--param INIT=true \
|
|
25
|
+
--production-reason '初始化生产流水线参数' --wait --json
|
|
92
26
|
|
|
93
|
-
|
|
27
|
+
numa pipeline build APPLICATION --tier production --branch BRANCH \
|
|
28
|
+
--param ENV_ID=prd \
|
|
29
|
+
--production-reason '执行生产构建与部署' --wait --json
|
|
94
30
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
numa pipeline platform-build resolve --client-request-id APPLICATION-COMMIT_SHA --json
|
|
99
|
-
numa pipeline platform-build status REQUEST_ID --watch --json
|
|
100
|
-
numa pipeline platform-build log REQUEST_ID --start 0 --json
|
|
31
|
+
numa pipeline status REQUEST_ID --watch --json
|
|
32
|
+
numa pipeline log REQUEST_ID --offset 0 --json
|
|
33
|
+
numa pipeline builds --app APPLICATION --tier production --branch BRANCH --json
|
|
101
34
|
```
|
|
102
35
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### GitOps writer/账本未知
|
|
106
|
-
|
|
107
|
-
Jenkins 可能在“更新环境镜像”阶段显示失败或 image intent 保持 `UNKNOWN`,但远端 Codeup CAS 和 Flux 部署实际已成功。此时分别核验:
|
|
108
|
-
|
|
109
|
-
- 原 platform request/build/log;
|
|
110
|
-
- exact application、binding/target、source revision、image repository/tag/digest、expected old head 和稳定 request marker;
|
|
111
|
-
- 远端 target HEAD/revision 与目标 image 字段;
|
|
112
|
-
- Flux GitRepository/Kustomization/HelmRelease/Deployment 的 exact observed revision/image。
|
|
113
|
-
|
|
114
|
-
远端 marker/HEAD 和健康运行态证明原 CAS 可能已经落地,不授权重放 build、生成新 key、手工重写 Flux、直改数据库或伪造 Jenkins `SUCCESS`。只有 runtime command catalog 明确提供、且服务端能对同一 durable request 做 exact reconciliation 的 reconcile/recover 能力才可推进账本。当前没有该能力时报告 `RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED` 并停止。
|
|
115
|
-
|
|
116
|
-
## 6. 失败分类
|
|
117
|
-
|
|
118
|
-
只选择有证据的一类,并列出已排除项:
|
|
119
|
-
|
|
120
|
-
1. `APPLICATION_NOT_REGISTERED`:应用目录缺失。
|
|
121
|
-
2. `JENKINS_NOT_INITIALIZED`:instance/inventory/Job/scan/branch/binding 缺失。
|
|
122
|
-
3. `PLATFORM_V2_NOT_READY`:writer bootstrap、provenance 或 rollout/configure 未达到 exact verified readiness。
|
|
123
|
-
4. `PROJECT_STANDARD`:Jenkinsfile、build profile、产物或启动契约不合规。
|
|
124
|
-
5. `AUTHORIZATION_OR_APPROVAL`:登录、角色或生产审批不足。
|
|
125
|
-
6. `BUILD_OR_RUNTIME_FAILURE`:编译、测试、镜像、迁移、探针或启动失败。
|
|
126
|
-
7. `GITOPS_LEDGER_UNRESOLVED`:远端/运行态可能成功,但 writer response/readback/平台持久化未确认。
|
|
127
|
-
8. `CONTROL_PLANE_OUTAGE`:DevOps API 路由或后端不可用,无法读取正常控制面状态。
|
|
128
|
-
|
|
129
|
-
日志从第一个根因和最终 `Finished:` 共同判断,不只看最后一层包装异常。
|
|
130
|
-
|
|
131
|
-
## 7. 运行态与完成标准
|
|
132
|
-
|
|
133
|
-
v2 完成状态分三列报告:
|
|
134
|
-
|
|
135
|
-
| 维度 | 必要证据 |
|
|
136
|
-
|---|---|
|
|
137
|
-
| Jenkins/build | 同一 request/build 的明确终态与源码/image identity |
|
|
138
|
-
| Platform ledger | 同一 image intent/CAS 的 verified terminal result |
|
|
139
|
-
| Flux/runtime | exact Git revision、controller healthy、workload exact image 与 readiness |
|
|
140
|
-
|
|
141
|
-
只有三者一致,且仓库定义的健康/迁移/能力探针通过,才报告平台自动化部署成功。Flux/Deployment 健康但账本未决时只能报告运行态部署成功;“构建已触发”“镜像已推送”或“Flux 已同步”都不能单独冒充完整发布成功。
|
|
142
|
-
|
|
143
|
-
最终报告先给结论,再列 application、mode、branch/SHA、request/build、幂等键、三维状态、运行态验证、未决风险和安全恢复入口。
|
|
144
|
-
|
|
145
|
-
## 8. 控制平面自部署与 break-glass
|
|
146
|
-
|
|
147
|
-
若目标就是提供 Numa pipeline API 的 DevOps 平台且控制面已宕机,停止 CLI 重试并说明自举死锁。只有用户明确授权且已有受控规程时,才用白名单 Jenkins UI/恢复服务固定 branch/commit、审批和审计恢复后端;恢复后立即回到 Numa CLI 校正原请求并验证运行态。手工构建可能不会进入平台账本,必须如实报告。
|
|
36
|
+
首次自然空跑与显式 `INIT=true` 二选一;已经有参数定义时无需重复初始化。详细参数和恢复规则见 [references/cli-contract.md](references/cli-contract.md),失败分类见 [references/diagnostics.md](references/diagnostics.md)。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Numa Jenkins 发布"
|
|
3
|
-
short_description: "安全执行
|
|
4
|
-
default_prompt: "使用 $numa-jenkins-deployment
|
|
3
|
+
short_description: "安全执行 canonical Jenkins/Flux 发布"
|
|
4
|
+
default_prompt: "使用 $numa-jenkins-deployment 通过 canonical Multibranch pipeline build 完成预检、参数初始化、构建触发、状态与日志恢复,并核验 Jenkins、Flux 和 runtime。结果未知时只恢复原请求,不使用已退役的签名快照表面。"
|
|
@@ -1,69 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill_name": "numa-jenkins-deployment",
|
|
3
2
|
"evals": [
|
|
4
3
|
{
|
|
5
|
-
"
|
|
6
|
-
"prompt": "
|
|
7
|
-
"expected_output": "
|
|
8
|
-
"files": [],
|
|
9
|
-
"expectations": [
|
|
10
|
-
"先验证 CLI/auth/profile、Git HEAD 与远端、仓库 preflight、应用和 Jenkins binding,再给出写命令",
|
|
11
|
-
"使用 order-api-4f7d9b1 和 order-web-4f7d9b1 作为每应用稳定幂等键",
|
|
12
|
-
"生产命令使用 pipeline platform-build trigger、--approve-id ORDER-STANDARD-RELEASE、--yes、--wait 和 --json,且没有任意 --param",
|
|
13
|
-
"明确 order-api 只有 build、platform ledger、Flux/runtime 三方完成后才允许触发 order-web",
|
|
14
|
-
"网络或轮询结果不明时按原 key 使用 platform-build resolve/status/log"
|
|
15
|
-
]
|
|
4
|
+
"name": "canonical-v2-production",
|
|
5
|
+
"prompt": "active-code-inbox 使用 gitopsBuildEntry,生产分支 Job 已初始化。给出发布和未知结果恢复方案。",
|
|
6
|
+
"expected_output": "使用 pipeline build 传 ENV_ID 和生产原因;保存 requestId,并只用 status/log/builds 恢复;不使用任何签名快照命令。"
|
|
16
7
|
},
|
|
17
8
|
{
|
|
18
|
-
"
|
|
19
|
-
"prompt": "
|
|
20
|
-
"expected_output": "
|
|
21
|
-
"files": [],
|
|
22
|
-
"expectations": [
|
|
23
|
-
"A 被分类为 APPLICATION_NOT_REGISTERED,并建议使用 numa-create-application/onboarding,而不是直接建 Jenkins Job",
|
|
24
|
-
"B 被分类为 JENKINS_NOT_INITIALIZED,指出 inventory、Job/binding 确认责任属于平台初始化",
|
|
25
|
-
"C 被分类为 PROJECT_STANDARD 或构建运行规范问题,并建议使用 mci-build-standards",
|
|
26
|
-
"没有触发 build、retry、stop,也没有擅自修改项目",
|
|
27
|
-
"明确列出已排除类别和每个项目的最小下一步"
|
|
28
|
-
]
|
|
9
|
+
"name": "first-run-initialization",
|
|
10
|
+
"prompt": "新的 Multibranch 子 Job 尚无 parameterDefinitions,如何完成第一次部署?",
|
|
11
|
+
"expected_output": "先无业务参数运行或使用 INIT=true 初始化;成功后用新的幂等键和 ENV_ID 触发第二次实际构建。"
|
|
29
12
|
},
|
|
30
13
|
{
|
|
31
|
-
"
|
|
32
|
-
"prompt": "
|
|
33
|
-
"expected_output": "
|
|
34
|
-
"files": [],
|
|
35
|
-
"expectations": [
|
|
36
|
-
"分类为 CONTROL_PLANE_OUTAGE 与后端运行时失败叠加,而不是 Numa 日志命令缺失",
|
|
37
|
-
"解释 Jenkins 网页直连而 Numa log 依赖 DevOps 后端代理",
|
|
38
|
-
"停止重复 build/retry,并明确前端不得在后端恢复前触发",
|
|
39
|
-
"break-glass 要求白名单 Job、固定 branch/commit、审批、SSO/MFA 或既有受控权限和审计",
|
|
40
|
-
"后端恢复后切回 Numa CLI校正旧状态、验证运行态,再部署前端,并说明手工构建可能不会回填 request 表"
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"id": 4,
|
|
45
|
-
"prompt": "active-code-inbox 已确认使用 PLATFORM_V2,rollout 为 READY/JENKINS_API_VERIFIED/VERIFIED。请给出生产触发和未知结果恢复命令;不得传任意 Jenkins 参数。",
|
|
46
|
-
"expected_output": "使用 platform-build trigger,并且未知 trigger 只按原 client request id resolve/status/log,不回退 legacy pipeline build。",
|
|
47
|
-
"files": [],
|
|
48
|
-
"expectations": [
|
|
49
|
-
"触发使用 numa pipeline platform-build trigger,包含稳定 idempotency key、生产审批和 --yes --wait --json",
|
|
50
|
-
"明确 v2 不接受 --param,也不回退 numa pipeline build",
|
|
51
|
-
"未知结果使用同一 key 的 platform-build resolve,再按同一 request status/log",
|
|
52
|
-
"说明 Jenkins 只构建镜像并提交一次 intent,Flux CAS 由 server-owned writer 执行"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"id": 5,
|
|
57
|
-
"prompt": "某 v2 构建在 Update Environment Image 阶段以 GitOpsUnknownResult 失败,但远端 prd HEAD 含本次 request marker,目标 values 的 image tag/digest 与 intent 一致,Flux 和 Deployment 也已应用且健康;平台 image-intent 仍 UNKNOWN。是否应该重跑构建或本地再推一次 Flux?如何报告状态?",
|
|
58
|
-
"expected_output": "识别远端 CAS 已落地但平台账本未决,不重放任何写操作;分别报告 runtime 与 ledger,并等待同一 durable request 的服务端 exact reconciliation。",
|
|
59
|
-
"files": [],
|
|
60
|
-
"expectations": [
|
|
61
|
-
"不重跑 build、不换 idempotency key、不创建第二个 image/commit、不手工再写 Flux",
|
|
62
|
-
"解释 Git CAS 可原子成功,但 response/readback/平台持久化仍可能未知",
|
|
63
|
-
"要求匹配 application、binding/target、request/build、source、image、expected old head、marker 和 remote HEAD/file content",
|
|
64
|
-
"报告 RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED,而不是完整平台发布成功",
|
|
65
|
-
"只有服务端对同一 durable request 的受支持 reconcile/recover 能推进账本;命令不存在时停止而不是发明命令"
|
|
66
|
-
]
|
|
14
|
+
"name": "retired-snapshot-surface",
|
|
15
|
+
"prompt": "服务端仍显示历史签名快照 capability,是否应继续使用旧触发命令?",
|
|
16
|
+
"expected_output": "不使用。该表面已退役,只走 canonical pipeline build,并把旧 capability 视为待清理历史状态。"
|
|
67
17
|
}
|
|
68
18
|
]
|
|
69
19
|
}
|
|
@@ -1,120 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CLI contract
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
优先使用 PATH 中的 `numa`,并在一次发布中固定同一入口:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
numa --version
|
|
9
|
-
numa commands --json
|
|
10
|
-
numa auth status --json
|
|
11
|
-
numa profile --json
|
|
12
|
-
numa pipeline --help
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
缺少命令时可以只读检查公开最新版,但切换前要告知用户,且发现和写操作必须使用同一已验证版本:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npx -y --prefer-online --registry=https://registry.npmjs.org/ \
|
|
19
|
-
@numa-tech/numa@latest --version
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
不要硬编码本地源码的 `dist/cli.js` 作为通用方案。401/403 不得通过裸 API、token cache 或手工 Bearer 绕过。
|
|
23
|
-
|
|
24
|
-
## 2. 判定 delivery mode
|
|
3
|
+
## 只读发现
|
|
25
4
|
|
|
26
5
|
```bash
|
|
27
|
-
numa
|
|
6
|
+
numa pipeline list --app APPLICATION --tier production --branch BRANCH --json
|
|
28
7
|
numa pipeline inspect APPLICATION --json
|
|
29
|
-
numa pipeline
|
|
30
|
-
numa pipeline platform-build --help
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
`PLATFORM_V2` 必须同时有运行时 platform-build capability、verified platform-build rollout/server-owned writer、confirmed binding 和可构建 branch。明确 legacy binding 才进入 `LEGACY_V1`。命令存在但服务端 capability/rollout 未就绪不能冒充 v2 ready,也不能静默回退 v1。
|
|
34
|
-
|
|
35
|
-
Multibranch 父 Job 的 `buildable=false` 可能正常;必须解析目标 branch child。完整初始化需要 INDEX_ONLY/NoTrigger scan 的 task/result 与“没有触发 build”证据,只建父 Job 或 `scanMode=NONE` 不足。
|
|
36
|
-
|
|
37
|
-
## 3. PLATFORM_V2 构建
|
|
38
|
-
|
|
39
|
-
运行时帮助:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
numa pipeline platform-build trigger --help
|
|
43
|
-
numa pipeline platform-build resolve --help
|
|
44
|
-
numa pipeline platform-build status --help
|
|
45
|
-
numa pipeline platform-build log --help
|
|
46
|
-
numa pipeline platform-build stop --help
|
|
8
|
+
numa pipeline builds --app APPLICATION --tier production --branch BRANCH --limit 20 --json
|
|
47
9
|
```
|
|
48
10
|
|
|
49
|
-
|
|
11
|
+
必须确认 binding 指向 canonical Multibranch root,目标 branch child 已被 scan 到。不得通过 Job 名猜环境。
|
|
50
12
|
|
|
51
|
-
|
|
52
|
-
numa pipeline platform-build trigger APPLICATION \
|
|
53
|
-
--tier production \
|
|
54
|
-
--branch BRANCH \
|
|
55
|
-
--idempotency-key APPLICATION-COMMIT_SHA \
|
|
56
|
-
--approve-id APPROVAL_ID \
|
|
57
|
-
--production-reason '具体生产发布原因' \
|
|
58
|
-
--yes --wait --json
|
|
59
|
-
```
|
|
13
|
+
## 初始化
|
|
60
14
|
|
|
61
|
-
|
|
15
|
+
新 branch child 在第一次 Pipeline 执行前没有 parameterDefinitions。第一次运行不带业务参数,`gitopsBuildEntry()` 会写入参数定义并结束。也可以显式传 `INIT=true` 强制重新初始化。
|
|
62
16
|
|
|
63
|
-
|
|
64
|
-
- idempotency key 是稳定 client request id;未知结果复用原 key,新发布才用新 key。
|
|
65
|
-
- Jenkins 只构建/push 镜像并提交一次 image intent;DevOps server-owned writer 执行 Flux SCM CAS。
|
|
66
|
-
- `--wait` 只观察原 request,终端中断不停止远端任务。
|
|
17
|
+
初始化请求与实际部署是两个独立构建,必须使用不同 idempotency key。初始化成功不等于镜像已构建或 Flux 已更新。
|
|
67
18
|
|
|
68
|
-
##
|
|
19
|
+
## 实际部署
|
|
69
20
|
|
|
70
21
|
```bash
|
|
71
|
-
numa pipeline
|
|
72
|
-
--
|
|
73
|
-
|
|
74
|
-
--app APPLICATION --tier production --json
|
|
75
|
-
numa pipeline platform-build status REQUEST_ID --watch --json
|
|
76
|
-
numa pipeline platform-build log REQUEST_ID --start 0 --json
|
|
22
|
+
numa pipeline build APPLICATION --tier TIER --branch BRANCH \
|
|
23
|
+
--param ENV_ID=ENVIRONMENT_ID \
|
|
24
|
+
--production-reason '明确的发布原因' --wait --json
|
|
77
25
|
```
|
|
78
26
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Stop 是独立写操作,必须由用户明确要求并遵循生产治理;响应未知后只读取同一 request,不重放 stop。
|
|
82
|
-
|
|
83
|
-
## 5. GitOps writer 未决契约
|
|
84
|
-
|
|
85
|
-
若 Jenkins 最终失败发生在 image update/writer 阶段,或 image intent 为 `UNKNOWN`,先保存原 request/build/log。支持的 server reconciliation 必须精确匹配:
|
|
86
|
-
|
|
87
|
-
- application、service binding/target;
|
|
88
|
-
- client request/idempotency key、request ID、build number;
|
|
89
|
-
- source revision;
|
|
90
|
-
- image repository、tag、digest;
|
|
91
|
-
- expected old target head 和稳定 request marker;
|
|
92
|
-
- remote target HEAD/revision 与目标文件 image 字段。
|
|
27
|
+
按 Jenkinsfile 和平台登记参数补充其它 `--param KEY=VALUE`。不得把 secret、token、password 或 credential 放在参数、日志或聊天中。
|
|
93
28
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
只有运行时 command catalog 明确提供的服务端 reconcile/recover,且它恢复同一 durable request,才可推进平台账本。当前 CLI 没有该命令时输出 `RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED`,等待控制面能力;不要发明命令或使用 local Flux fallback 代替。
|
|
97
|
-
|
|
98
|
-
## 6. LEGACY_V1 兼容命令
|
|
99
|
-
|
|
100
|
-
仅用于明确 legacy binding:
|
|
29
|
+
## 恢复
|
|
101
30
|
|
|
102
31
|
```bash
|
|
103
|
-
numa pipeline
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
--approve-id APPROVAL_ID \
|
|
107
|
-
--production-reason '具体生产发布原因' \
|
|
108
|
-
--idempotency-key APPLICATION-COMMIT_SHA \
|
|
109
|
-
--wait --json
|
|
110
|
-
|
|
111
|
-
numa pipeline builds --app APPLICATION --tier production --branch BRANCH --limit 20 --json
|
|
112
|
-
numa pipeline status REQUEST_OR_BUILD_ID --watch --json
|
|
113
|
-
numa pipeline log REQUEST_OR_BUILD_ID --follow
|
|
32
|
+
numa pipeline status REQUEST_ID --watch --json
|
|
33
|
+
numa pipeline log REQUEST_ID --offset 0 --json
|
|
34
|
+
numa pipeline builds --app APPLICATION --tier TIER --branch BRANCH --json
|
|
114
35
|
```
|
|
115
36
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
37
|
+
- 已保存 requestId:只查询同一个 request。
|
|
38
|
+
- 未保存 requestId:按应用、tier、branch 和时间窗口找回。
|
|
39
|
+
- trigger 响应未知:先查账本和 Jenkins,不生成新的请求。
|
|
40
|
+
- Flux 已提交但平台状态未知:核对同一提交和镜像,不重跑构建或再推一次 Flux。
|
|
41
|
+
- 已退役的签名快照命令不得作为恢复手段。
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| 只有父 Job 或 `scanMode=NONE` | `JENKINS_NOT_INITIALIZED` | 完整的 branch 初始化尚未发生 | 新部署命令会在 SCM/Jenkinsfile 已验证后自动尝试一次 INDEX_ONLY/NoTrigger scan;仍失败时用受治理的初始化/replan 修复 |
|
|
14
14
|
| 目标分支经过自动索引后仍无 child | `JENKINS_BRANCH_FILTERED` | Jenkins 分支策略过滤、索引未收敛或 branch child 不可构建 | 检查 Multibranch branch source/filter 与 Jenkinsfile;不要改用默认分支或影子 Job |
|
|
15
15
|
| Jenkins 索引读取结果不可确认 | `JENKINS_BRANCH_DISCOVERY_FAILED` | Jenkins 上游读取、超时或中断 | 保留同一部署参数和幂等键,先查状态与 Jenkins 索引结果,再按服务端错误恢复 |
|
|
16
|
-
|
|
|
16
|
+
| 仍出现签名 snapshot capability | `RETIRED_PIPELINE_SURFACE` | 服务端或本地 CLI 仍暴露已退役路径 | 不调用旧命令;升级组件并只使用 canonical `pipeline build` |
|
|
17
17
|
| 401 | `AUTHORIZATION_OR_APPROVAL` | 登录缺失、过期或 issuer/profile 不匹配 | `auth status`、`profile`,必要时重新登录 |
|
|
18
18
|
| 403 | `AUTHORIZATION_OR_APPROVAL` | 团队权限、平台角色或生产角色不足 | 核对成员关系和 ops-admin;不要索要 token 绕过 |
|
|
19
19
|
| 生产审批缺失/无效 | `AUTHORIZATION_OR_APPROVAL` | 服务端治理拒绝写操作 | 使用真实 approval ID 或合规具体原因 |
|
|
@@ -42,7 +42,7 @@ app 存在
|
|
|
42
42
|
|
|
43
43
|
使用 `mci-build-standards` 核对:
|
|
44
44
|
|
|
45
|
-
- Jenkinsfile 使用统一 `buildEntry()`;
|
|
45
|
+
- v2 Jenkinsfile 使用统一 `gitopsBuildEntry()`;尚未迁移的 v1 应用才保留 `buildEntry()`;
|
|
46
46
|
- `APP_NAME` 与应用/镜像名一致;
|
|
47
47
|
- monorepo 的 `APP_HOME` 正确;
|
|
48
48
|
- `TRIGGER_BUILD`、目标 branch 和手动/webhook 策略一致;
|
|
@@ -1,94 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Release policy
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 授权与目标
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
部署请求只授权指定应用、环境和正常发布步骤。生产操作前必须通过只读调用解析 exact application、tier、branch、Jenkins binding、GitOps target 和集群。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. `AGENTS.md` 和仓库部署文档;
|
|
9
|
-
3. 用户为本次发布明确提供的值。
|
|
7
|
+
生产部署只允许干净、已提交且已推送的 revision。不得绕过 dirty-worktree guard,不得发布未跟踪本地状态。
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
## 执行顺序
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
1. 运行项目声明的 preflight/verify。
|
|
12
|
+
2. 确认 canonical Multibranch branch Job 已存在。
|
|
13
|
+
3. 缺少参数定义时先执行初始化构建;初始化不会部署。
|
|
14
|
+
4. 用新的幂等键执行实际构建。
|
|
15
|
+
5. 逐项等待前置应用成功后再启动下游。
|
|
16
|
+
6. 核对 Jenkins、Flux 与 runtime 三方证据。
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
"schemaVersion": 1,
|
|
18
|
-
"tier": "production",
|
|
19
|
-
"approval": {
|
|
20
|
-
"id": "APPROVAL-ID",
|
|
21
|
-
"reason": "具体生产发布原因"
|
|
22
|
-
},
|
|
23
|
-
"preflight": [
|
|
24
|
-
{
|
|
25
|
-
"command": "./scripts/verify-cli-deploy.sh",
|
|
26
|
-
"description": "仓库发布门禁"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"applications": [
|
|
30
|
-
{
|
|
31
|
-
"code": "backend-application",
|
|
32
|
-
"description": "先部署迁移和 API"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"code": "frontend-application",
|
|
36
|
-
"description": "仅在后端成功后部署"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
```
|
|
18
|
+
## 安全与恢复
|
|
41
19
|
|
|
42
|
-
|
|
20
|
+
- 不输出 access token、refresh token、Cookie、client secret、Jenkins password、SCM 凭据或 kubeconfig。
|
|
21
|
+
- 不把敏感值放入 Jenkins 参数。
|
|
22
|
+
- 同一请求结果不明时只读恢复,不换 key 重放。
|
|
23
|
+
- 不手工改写 Flux 来掩盖失败。
|
|
24
|
+
- 旧签名快照构建表面已退役;任何仍出现的旧 capability 或数据库记录只作历史审计,不授权调用。
|
|
43
25
|
|
|
44
|
-
|
|
45
|
-
- tier 只接受 develop、staging、production;
|
|
46
|
-
- applications 至少一个,code 非空且唯一;
|
|
47
|
-
- production 至少提供真实 approval ID 或不少于 10 字符的具体原因;
|
|
48
|
-
- approval ID 匹配 `[A-Za-z0-9][A-Za-z0-9._:/-]{0,159}`;
|
|
49
|
-
- reason 不超过 800 字符;
|
|
50
|
-
- manifest、preflight 和 build parameters 不含 Secret。
|
|
26
|
+
## 完成条件
|
|
51
27
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
生产发布前:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
git status --short --branch
|
|
58
|
-
git check-ref-format --branch BRANCH
|
|
59
|
-
git fetch origin BRANCH
|
|
60
|
-
git rev-parse HEAD
|
|
61
|
-
git rev-parse origin/BRANCH
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
要求工作树干净、branch 合法、本地 HEAD 与远端完全一致。不要 stash、reset、checkout 或提交用户的无关修改来强行通过。
|
|
65
|
-
|
|
66
|
-
逐条检查 preflight 命令内容后按顺序执行;第一条非零即停止。preflight 应覆盖编译、测试、打包和运行时产物契约,而不仅是静态 lint。
|
|
67
|
-
|
|
68
|
-
## 计划与授权
|
|
69
|
-
|
|
70
|
-
为每个应用派生稳定幂等键:
|
|
71
|
-
|
|
72
|
-
```text
|
|
73
|
-
APPLICATION-COMMIT_SHA
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
展示解析后的应用顺序、tier、branch/SHA、Jenkins binding、preflight、审批和幂等键。用户明确要求按仓库既有 manifest 发布该 branch,且解析没有改变目标或政策时,视为已授权该发布;任何新增目标或生产影响都要重新确认。
|
|
77
|
-
|
|
78
|
-
每个应用还要记录 delivery mode。`PLATFORM_V2` 使用 `pipeline platform-build trigger`,不接受任意参数;只有明确 `LEGACY_V1` 才使用 `pipeline build`。manifest 不能把 v2 应用静默降级成 legacy,也不能把同一 idempotency key 用于不同 source revision 或 image intent。
|
|
79
|
-
|
|
80
|
-
## 串行发布
|
|
81
|
-
|
|
82
|
-
依次执行 manifest applications。v2 前置应用只有 Jenkins/build、platform image-intent ledger 与 Flux/runtime 三方一致并通过健康检查后,才算 `SUCCESS`;后端、数据库迁移或公共 API 等前置应用未满足该条件时,禁止触发前端和下游应用。
|
|
83
|
-
|
|
84
|
-
如果本地等待中断:
|
|
85
|
-
|
|
86
|
-
- 远端任务可能仍运行;
|
|
87
|
-
- 复用原幂等键;
|
|
88
|
-
- 先通过 builds/status/log 恢复;
|
|
89
|
-
- 不自动 retry,不推进下一个应用。
|
|
90
|
-
- 若远端 Flux CAS/运行态已经成功但平台 ledger 未决,报告 `RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED`,不重复发布,也不推进依赖完整平台成功证明的后续应用。
|
|
91
|
-
|
|
92
|
-
## 完成验证
|
|
93
|
-
|
|
94
|
-
除 Jenkins 终态外,还要执行仓库定义的健康、迁移或能力探针。v2 分别报告 Jenkins/build、platform ledger、Flux/runtime,及每个应用的 request/build ID、branch/SHA 和幂等键;失败或 ledger 未决时明确哪些后续应用被跳过。
|
|
28
|
+
只有当平台账本/Jenkins 为成功、Flux 目标文件指向本次镜像、目标工作负载实际运行该镜像且健康时,才报告部署成功。
|
|
@@ -16,7 +16,7 @@ Read [local-flux-release.md](references/local-flux-release.md) completely before
|
|
|
16
16
|
- Never read registry auth files, kubeconfig contents, application secrets, token caches, or `secrets/**`. Check only whether the required authenticated tools can operate.
|
|
17
17
|
- Do not modify Keycloak, database data, unrelated Flux resources, or a live Deployment unless the user separately placed that target in scope.
|
|
18
18
|
- A local interruption or registry/network error creates an unknown result. Inspect the existing image tag, Git ref, Flux revision, and workload before any retry. Reuse the exact operation identity; never create a second release to escape uncertainty.
|
|
19
|
-
- A
|
|
19
|
+
- A retired signed-snapshot build whose writer result is `UNKNOWN` is not evidence that the Flux write failed. Before selecting this fallback, inspect the original request plus the remote target HEAD/request marker and exact image field. If the intended CAS already landed, do not write Flux again; observe the existing revision and leave ledger reconciliation to the supported server-side recovery path.
|
|
20
20
|
|
|
21
21
|
## Finish with evidence
|
|
22
22
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use this runbook only after the user authorizes the exact deployment and the normal Jenkins/Numa pipeline is unavailable or explicitly excluded. Keep the pipeline failure evidence in the handoff, but do not repeatedly probe or trigger it once the fallback is selected.
|
|
4
4
|
|
|
5
|
-
Do not select the fallback merely because a
|
|
5
|
+
Do not select the fallback merely because a retired signed-snapshot build ended with `GitOpsUnknownResult`, a gateway timeout, or an image-intent ledger in `UNKNOWN`. First inspect the original request and the remote Flux branch. If the target HEAD contains the same stable request marker and the resolved image repository/tag/digest matches the original intent, the governed CAS already landed: skip image/Flux writes, observe that exact revision, and report the platform ledger separately. Local fallback cannot reconcile or overwrite the control-plane record.
|
|
6
6
|
|
|
7
7
|
## 1. Resolve and freeze the release identity
|
|
8
8
|
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { AuthConfig } from "../config.js";
|
|
2
|
-
import { type KeycloakTokenProvider } from "../oauth.js";
|
|
3
|
-
import { type IntegrationBootstrapActionKind, type IntegrationBootstrapActionStart, type IntegrationBootstrapActionView, type IntegrationBootstrapApplyStart, type IntegrationBootstrapRunView, type IntegrationBootstrapSession, type IntegrationBootstrapStart, type IntegrationBootstrapTrustAnchorClient } from "./schemas.js";
|
|
4
|
-
export declare const INTEGRATION_BOOTSTRAP_V2_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2";
|
|
5
|
-
export declare const INTEGRATION_BOOTSTRAP_PLAN_SESSION_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2/plan-sessions";
|
|
6
|
-
export declare const INTEGRATION_BOOTSTRAP_RUN_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2/runs";
|
|
7
|
-
export declare const INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CONFIGURATION = "/public/v1/keycloak-bootstrap/client-configuration";
|
|
8
|
-
export declare const INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CALLBACK = "/public/v1/keycloak-bootstrap/callback";
|
|
9
|
-
export interface IntegrationBootstrapApplyInput {
|
|
10
|
-
planSessionNo: string;
|
|
11
|
-
planDigest: string;
|
|
12
|
-
clientRequestId: string;
|
|
13
|
-
}
|
|
14
|
-
export interface IntegrationBootstrapActionInput {
|
|
15
|
-
expectedRunVersion: number;
|
|
16
|
-
clientRequestId: string;
|
|
17
|
-
}
|
|
18
|
-
export interface IntegrationBootstrapTrustAnchorDocument {
|
|
19
|
-
realm: "master";
|
|
20
|
-
clientId: "mci-devops-platform-bootstrap";
|
|
21
|
-
configurationDigest: string;
|
|
22
|
-
sourceUrl: string;
|
|
23
|
-
configuration: IntegrationBootstrapTrustAnchorClient;
|
|
24
|
-
}
|
|
25
|
-
export interface IntegrationBootstrapApi {
|
|
26
|
-
getTrustAnchorConfiguration(): Promise<IntegrationBootstrapTrustAnchorDocument>;
|
|
27
|
-
startPlanSession(clientRequestId: string, idempotencyKey: string): Promise<IntegrationBootstrapStart>;
|
|
28
|
-
resolvePlanSession(clientRequestId: string): Promise<IntegrationBootstrapSession>;
|
|
29
|
-
getPlanSession(sessionNo: string): Promise<IntegrationBootstrapSession>;
|
|
30
|
-
startApply(input: IntegrationBootstrapApplyInput, idempotencyKey: string): Promise<IntegrationBootstrapApplyStart>;
|
|
31
|
-
resolveRun(clientRequestId: string): Promise<IntegrationBootstrapRunView>;
|
|
32
|
-
getRun(runNo: string): Promise<IntegrationBootstrapRunView>;
|
|
33
|
-
startAction(runNo: string, kind: Exclude<IntegrationBootstrapActionKind, "APPLY">, input: IntegrationBootstrapActionInput, idempotencyKey: string): Promise<IntegrationBootstrapActionStart>;
|
|
34
|
-
resolveAction(clientRequestId: string): Promise<IntegrationBootstrapActionView>;
|
|
35
|
-
getAction(actionNo: string): Promise<IntegrationBootstrapActionView>;
|
|
36
|
-
}
|
|
37
|
-
export interface IntegrationBootstrapClientDependencies {
|
|
38
|
-
fetch?: typeof fetch;
|
|
39
|
-
tokenProvider?: KeycloakTokenProvider;
|
|
40
|
-
}
|
|
41
|
-
export declare function integrationBootstrapIdempotencyKey(value: string): string;
|
|
42
|
-
export declare function integrationBootstrapClientRequestId(value: string): string;
|
|
43
|
-
export declare function integrationBootstrapRunNo(value: string): string;
|
|
44
|
-
export declare class IntegrationBootstrapClient implements IntegrationBootstrapApi {
|
|
45
|
-
private readonly config;
|
|
46
|
-
private readonly fetchImpl;
|
|
47
|
-
private readonly tokenProvider;
|
|
48
|
-
constructor(config: AuthConfig, dependencies?: IntegrationBootstrapClientDependencies);
|
|
49
|
-
private authenticatedFetch;
|
|
50
|
-
private json;
|
|
51
|
-
getTrustAnchorConfiguration(): Promise<IntegrationBootstrapTrustAnchorDocument>;
|
|
52
|
-
startPlanSession(clientRequestIdValue: string, keyValue: string): Promise<IntegrationBootstrapStart>;
|
|
53
|
-
resolvePlanSession(clientRequestIdValue: string): Promise<IntegrationBootstrapSession>;
|
|
54
|
-
getPlanSession(value: string): Promise<IntegrationBootstrapSession>;
|
|
55
|
-
startApply(input: IntegrationBootstrapApplyInput, keyValue: string): Promise<IntegrationBootstrapApplyStart>;
|
|
56
|
-
resolveRun(clientRequestIdValue: string): Promise<IntegrationBootstrapRunView>;
|
|
57
|
-
getRun(value: string): Promise<IntegrationBootstrapRunView>;
|
|
58
|
-
startAction(runNoValue: string, kind: Exclude<IntegrationBootstrapActionKind, "APPLY">, input: IntegrationBootstrapActionInput, keyValue: string): Promise<IntegrationBootstrapActionStart>;
|
|
59
|
-
resolveAction(clientRequestIdValue: string): Promise<IntegrationBootstrapActionView>;
|
|
60
|
-
getAction(value: string): Promise<IntegrationBootstrapActionView>;
|
|
61
|
-
}
|