Skip to content

ci: 镜像仓库凭据改从 common-shared 读取 - #203

Merged
makewheels merged 1 commit into
masterfrom
acr-creds-from-common
Sep 8, 2026
Merged

ci: 镜像仓库凭据改从 common-shared 读取#203
makewheels merged 1 commit into
masterfrom
acr-creds-from-common

Conversation

@makewheels

Copy link
Copy Markdown
Owner

为什么

infra 的密钥规则要求"共享凭据收口到 common 项目的受限路径",但 ACR 镜像仓库凭据(ACR_AK_ID / ACR_AK_SECRET / ACR_REGISTRY)此前只存在 speakup-secrets 的 prod /deployment 里,属于单仓库私有副本。

video-2022 恢复上线(makewheels/video-2022#114)也要推同一个 b4 命名空间,因此把这三个键收口到了 common-shared 的 dev /deployment(该 folder 此前已存在但为空,正是为共享部署凭据预留的位置)。值已按指纹比对确认与源一致。

改了什么

只加了一个 secrets-action 步骤,从 common-shared dev /deployment 读取,位置在 speakup-secrets prod 递归读取之后,因此 common 的值最终生效。13 行新增,无其它改动。

迁移与验证顺序

  1. 本 PR 合并后,下一次 master 部署会同时从两处拿到同值的 ACR 凭据 —— 这一步验证 speakup 的 OIDC identity 对 common-shared dev /deployment 有读权限。
  2. 部署成功后,再删除 speakup-secrets prod /deployment 里的 ACR_AK_ID / ACR_AK_SECRET / ACR_REGISTRY 三个旧键(符合"新值先写、验证消费者切换后再删旧副本")。
  3. 删除后再触发一次部署确认。

在步骤 1 验证通过前不要删旧键 —— 删早了会让生产部署直接失败。

影响面

ACR_AK_ID / ACR_AK_SECRET / ACR_REGISTRY 只被 ci-cd.yml 使用(全仓 grep 确认),storage-maintenance.yml 读 prod /deployment 但只用 SSH 相关键,不受影响。

按 infra 的"共享凭据收口到 common 项目"规则,ACR_AK_ID / ACR_AK_SECRET /
ACR_REGISTRY 改为从 common-shared 的 dev /deployment 读取,不再依赖
speakup-secrets 里的私有副本(video-2022 的部署流水线用同一路径)。

新增的读取步骤放在 speakup-secrets 递归读取之后,让 common 的值最终生效。
迁移期两处同值,等本流水线部署验证通过后再删除 speakup-secrets prod
/deployment 里的三个旧键。
@makewheels
makewheels merged commit 371cab8 into master Sep 8, 2026
4 checks passed
@makewheels
makewheels deleted the acr-creds-from-common branch September 8, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant