42 lines
1.3 KiB
Makefile
42 lines
1.3 KiB
Makefile
BUILDER ?= v3.16.0
|
|
RELEASE := v3.16
|
|
PKG := '*'
|
|
|
|
.PHONY: builder aports_update download upload
|
|
|
|
all: build
|
|
|
|
packages:
|
|
mkdir -p packages
|
|
distfiles:
|
|
mkdir -p distfiles
|
|
work:
|
|
mkdir -p work
|
|
|
|
aports:
|
|
git clone https://gitlab.alpinelinux.org/alpine/aports.git --depth=1
|
|
|
|
aports_update: aports
|
|
GIT_DIR=aports/.git git fetch origin -p
|
|
GIT_DIR=aports/.git git pull origin master
|
|
|
|
# Mounts release into /work of the builder container to build all
|
|
build: packages distfiles aports_update work
|
|
mkdir -p /tmp/_alpine-work
|
|
podman run -ti --rm \
|
|
-v ${PWD}/distfiles:/var/cache/distfiles \
|
|
-v ${PWD}/packages:/home/alpine/packages \
|
|
-v /tmp/_alpine-work:/home/alpine/work \
|
|
-v ${PWD}/$(RELEASE)/:/home/alpine/src:ro \
|
|
-v ${HOME}/.gitconfig/:/home/alpine/.gitconfig:ro \
|
|
-v ${HOME}/.abuild/:/home/alpine/.abuild:ro \
|
|
public.ecr.aws/zero-downtime/alpine-builder:${BUILDER} $(PKG)
|
|
doas rm -rf /tmp/_alpine-work
|
|
|
|
download:
|
|
aws s3 sync s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ packages/work/x86_64/ --exclude APKINDEX.tar.gz
|
|
|
|
upload:
|
|
aws s3 sync --delete packages/work/x86_64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --exclude APKINDEX.tar.gz
|
|
aws s3 cp packages/work/x86_64/APKINDEX.tar.gz s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --cache-control max-age=1
|