r-builds/Makefile
pat-s d34684260f
All checks were successful
ci/crow/cron/build/1 Pipeline was successful
ci/crow/cron/build/2 Pipeline was successful
ci/crow/cron/build/4 Pipeline was successful
ci/crow/cron/build/6 Pipeline was successful
ci/crow/cron/build/7 Pipeline was successful
ci/crow/cron/build/10 Pipeline was successful
ci/crow/cron/build/11 Pipeline was successful
ci/crow/cron/build/13 Pipeline was successful
ci/crow/cron/build/14 Pipeline was successful
ci/crow/cron/build/15 Pipeline was successful
ci/crow/cron/build/16 Pipeline was successful
ci/crow/cron/build/17 Pipeline was successful
ci/crow/cron/build/18 Pipeline was successful
ci/crow/cron/build/5 Pipeline was successful
ci/crow/cron/build/12 Pipeline was successful
ci/crow/cron/build/3 Pipeline was successful
ci/crow/cron/build/8 Pipeline was successful
ci/crow/cron/build/9 Pipeline was successful
feat: add alpine-3.24 build config (#5)
## Summary

Adds an `alpine-3.24` build configuration, mirroring the existing `alpine-3.23` setup.

- `builder/Dockerfile.alpine-324` — `FROM alpine:3.24`, `OS_IDENTIFIER=alpine-324`, copies `package.alpine-324`
- `builder/package.alpine-324` — nfpm spec (identical to 323)
- `builder/docker-compose.yml` — new `alpine-324` service
- `Makefile` `PLATFORMS` and `Justfile` `build-r-alpine-324` target
- `.crow/build.yaml` — alpine-324 matrix entries (arm64 + amd64), newest-first

Existing alpine-322/323 matrix entries are left intact.

Reviewed-on: #5
2026-06-12 13:46:11 +00:00

74 lines
2.5 KiB
Makefile

PLATFORMS := ubuntu-2004 ubuntu-2204 ubuntu-2404 ubuntu-2604 debian-10 debian-11 debian-12 centos-7 centos-8 rhel-9 opensuse-155 fedora-38 fedora-39 fedora-40 alpine-321 alpine-322 alpine-323 alpine-324 rhel-10
SLS_BINARY ?= ./node_modules/serverless/bin/serverless.js
deps:
npm install
docker-build:
@cd builder && docker compose build --parallel
AWS_ACCOUNT_ID:=$(shell aws sts get-caller-identity --output text --query 'Account')
AWS_REGION := us-east-1
docker-push: ecr-login docker-build
@for platform in $(PLATFORMS) ; do \
docker tag r-builds:$$platform $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/r-builds:$$platform; \
docker push $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/r-builds:$$platform; \
done
docker-down:
@cd builder && docker compose down
docker-build-r: docker-build
@cd builder && docker compose up
docker-shell-r-env:
@cd builder && docker compose run --entrypoint /bin/bash ubuntu-2004
ecr-login:
(aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com)
push-serverless-custom-file:
aws s3 cp serverless-custom.yml s3://rstudio-devops/r-builds/serverless-custom.yml
fetch-serverless-custom-file:
aws s3 cp s3://rstudio-devops/r-builds/serverless-custom.yml .
rebuild-all: deps fetch-serverless-custom-file
$(SLS_BINARY) invoke stepf -n rBuilds -d '{"force": true}'
serverless-deploy.%: deps fetch-serverless-custom-file
$(SLS_BINARY) deploy --stage $* --verbose
define GEN_TARGETS
docker-build-$(platform):
@cd builder && docker compose build $(platform)
build-r-$(platform):
@cd builder && R_VERSION=$(R_VERSION) docker compose run --rm $(platform)
test-r-$(platform):
@cd test && R_VERSION=$(R_VERSION) docker compose run --rm $(platform)
bash-$(platform):
docker run -it --rm --entrypoint /bin/bash -v $(CURDIR):/r-builds r-builds:$(platform)
.PHONY: docker-build-$(platform) build-r-$(platform) test-r-$(platform) bash-$(platform)
endef
$(foreach platform,$(PLATFORMS), \
$(eval $(GEN_TARGETS)) \
)
print-platforms:
@echo $(PLATFORMS)
# Helper for launching a bash session on a docker image of your choice. Defaults
# to "ubuntu:xenial".
TARGET_IMAGE?=ubuntu:xenial
bash:
docker run --privileged=true -it --rm \
-v $(CURDIR):/r-builds \
-w /r-builds \
${TARGET_IMAGE} /bin/bash
.PHONY: deps docker-build docker-push docker-down docker-build-package docker-shell-package-env ecr-login fetch-serverless-custom-file print-platforms serverless-deploy