devxy/build-cran-binaries
Watch
1
0
Fork
You've already forked build-cran-binaries
0

ci(reindex): pass the metadata DB to per-minor index builds and fail on errors

Pass `metadata_db_*` explicitly to every per-minor `upload_package_index()`
call instead of relying on bincraft's implicit production defaults, which
rpkgs/bincraft#211 removes.
Give the build-all-versions index step the `PGPASS` secret it lacked, so its
per-minor reindex no longer runs without the ABI classifier cache.
Replace `|| true` in the per-minor loops: every minor is still attempted, but
the step now fails and names the minors whose reindex failed.
This commit is contained in:
Patrick Schratz 2026-10-15 14:18:03 +00:00
commit 56f3cf368a
No known key found for this signature in database
GPG key ID: 62050D5BC68AB6DC

View file

@ -162,10 +162,12 @@ steps:
# The codename is detected from the image's /etc/os-release.
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
- |
failed=""
for RBIN in /opt/R/[0-9]*/bin/R; do
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'))" || true
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || failed="$failed $RMINOR"
done
if [ -n "$failed" ]; then echo "Per-minor reindex failed for:$failed" >&2; exit 1; fi
- name: Purge CDN cache
image: reg.devxy.io/docker.io/library/alpine:3.24