CI/CD: post-deploy image variants job (template #152)
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, gitlab, kubernetes, yaml
- 领域
- ci-cd, devops, documentation
调研方向
阅读 content/6.deployment/3.ci-cd.md 和 7.upgrading-the-template.md 中接下来的发布章节,然后将现有的缓存预热说明与此处描述的部署后图像变体工作流进行比较。记录命令、平台特定的作业或步骤、开关、失败时的行为,以及在 API pod 中运行的原因。两页都说明新工作流并保留手动备用步骤后,即为完成。
由索引模型根据 Issue 内容生成。
描述
Template #152 (on main, next template release) adds a post-deploy job that generates missing imagine variants. content/6.deployment/3.ci-cd.md should describe it next to the cache warm (and 7.upgrading-the-template.md in the next release's section).
What it does:
- Command:
generate_image_variants [track]inbin/devops/k8s.shrunsbin/console silverback:api-components:imagine:generate -vin the API pod (bundle 2.0.0-alpha.15, docs#213). It generates every variant not stored yet, one image at a time, instead of visitors' requests doing it after a new or changed filter. - Purge: if anything was generated, it runs
purge-http-cacheso cached API responses list the new variants. Withprovider cloudflare, that's a purge everything at the edge. - Log: it lists every variant except those already stored.
- Exit codes: 1 means a variant failed; it purges first, then fails the job. 2 means an unknown
--filter/--class.
Where it runs:
- GitLab:
image variants <track>jobs (allow_failure,environment: action: verify) after each deploy job. Eachwarm cache <track>nowneeds:it (optional), so the warm requests pages whose variants exist. - GitHub: a
continue-on-error"Generate image variants" step after fixtures and before the warm, inci.ymlandproduction.yml. - Never fails a deploy: it's a separate job/step.
Switches (per track, like the warm; not GitLab environment-scoped, since staging runs under environment: production):
CWA_CI_IMAGE_VARIANTS_PRODUCTION: on unless"false"CWA_CI_IMAGE_VARIANTS_STAGING,_REVIEW,_CANARY: off unless"true"
Why not a Helm hook Job: purge-http-cache reaches Souin through the API pod's loopback admin API, so a Job pod would purge its own idle Caddy.
Upgrade (next release): copying the job makes the first deploy generate every image's WebP variants (#149) and purge by itself. The manual imagine:generate --dry-run / imagine:generate / purge-http-cache steps remain as the fallback without it.
- 主要语言
- Vue
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
components-web-app/docs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
components-web-app/docs#245 ·
-
难度 2/5 半天 新手友好度 68/100
components-web-app/docs#244 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
components-web-app/docs#243 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
components-web-app/docs#241 ·
-
documentation
难度 5/5 一周以上 新手友好度 15/100
components-web-app/docs#246 ·
查看 components-web-app/docs 的全部 Issue
相似的 Issue
-
[Bug] web.deploymentStrategy and admintools.deploymentStrategy are ignored, and component ServiceAccounts have no namespace可能已有人在做 @wankhede04 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
temporalio/helm-charts#1006 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
opdev/vuln-scan-cert#44 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 70/100
s4u/setup-maven-action#172 ·
-
Add dependabot未关闭feat
难度 2/5 1 小时以内 新手友好度 72/100
open-nudge/opentemplate#204 ·
维护者通常 1 天内回复