Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

CI/CD: post-deploy image variants job (template #152)

Đã đóng Phù hợp với người mới
#214 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, gitlab, kubernetes, yaml
Lĩnh vực
ci-cd, devops, documentation

Hướng nghiên cứu

Đọc content/6.deployment/3.ci-cd.md và phần phát hành tiếp theo trong 7.upgrading-the-template.md, sau đó so sánh các hướng dẫn làm nóng cache hiện có với quy trình biến thể hình ảnh sau triển khai được mô tả ở đây. Ghi lại lệnh, job hoặc bước đặc thù của nền tảng, các tùy chọn, cách xử lý khi thất bại và lý do quy trình chạy trong pod API. Hoàn tất khi cả hai trang giải thích quy trình mới và giữ lại các bước dự phòng thủ công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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] in bin/devops/k8s.sh runs bin/console silverback:api-components:imagine:generate -v in 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-cache so cached API responses list the new variants. With provider 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. Each warm cache <track> now needs: 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, in ci.yml and production.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.

Ngôn ngữ chính
Vue
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của components-web-app/docs

Tất cả issue của components-web-app/docs

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.