feat(ci): purge CDN cache after process-updates runs (#71)

## Summary

- `process_cran_updates()` ends with `upload_package_index()`, refreshing `src/contrib/PACKAGES{,.gz,.rds,.db}` in S3 — but no CDN purge follows.
- The CDN was only purged by the daily `update-package-index-*` chain, so between cron runs the edge kept serving stale indexes. A binary that landed in S3 was effectively invisible to `install.packages()` until the index-update chain caught up.

Adds the same `Purge CDN cache` step that `update-package-index-*` already uses, parameterized per platform/arch. The script and image are unchanged.

Reviewed-on: #71
This commit is contained in:
Patrick Schratz 2026-05-28 11:50:04 +00:00 committed by Patrick Schratz
commit 494730be5d

View file

@ -77,3 +77,17 @@ steps:
operator: 'Equal'
value: 'true'
effect: 'NoSchedule'
- name: Purge CDN cache
image: reg.devxy.io/docker.io/library/alpine:3.23
environment:
BUNNYNET_API_KEY:
from_secret: BUNNYNET_API_KEY
SUBDOMAIN1: 'cran.devxy.io'
SUBDOMAIN2: 'cran.allianceswisspass.devxy.io'
SUBDOMAIN3: 'cran.rpkgs.com'
OS_ID: rhel10
ARCH: amd64
commands:
- apk add --no-cache -q bash curl
- bash scripts/purge_cdn_cache.sh "$BUNNYNET_API_KEY" "$ARCH" "$OS_ID" "$SUBDOMAIN1" "$SUBDOMAIN2" "$SUBDOMAIN3"