2022-10-03 16:41:29 +00:00
|
|
|
BUILDER := v3.16.2
|
2022-07-12 11:15:51 +00:00
|
|
|
RELEASE := v3.16
|
2022-03-25 11:06:28 +00:00
|
|
|
PKG := '*'
|
2021-11-12 17:28:59 +00:00
|
|
|
|
2022-09-06 11:30:04 +00:00
|
|
|
CF_DIST := E1YFUJXMCXT2RN
|
|
|
|
|
2022-10-03 16:41:29 +00:00
|
|
|
.PHONY: builder aports download upload packages
|
2021-11-12 17:28:59 +00:00
|
|
|
|
2022-03-23 12:23:03 +00:00
|
|
|
all: build
|
|
|
|
|
2021-11-12 17:28:59 +00:00
|
|
|
packages:
|
2022-10-03 18:24:01 +00:00
|
|
|
mkdir -p packages/kubezero/aarch64 packages/kubezero/x86_64
|
2022-10-03 16:41:29 +00:00
|
|
|
|
2021-11-12 17:28:59 +00:00
|
|
|
distfiles:
|
|
|
|
mkdir -p distfiles
|
|
|
|
|
|
|
|
aports:
|
2022-10-03 16:41:29 +00:00
|
|
|
[ -d aports/.git ] && { GIT_DIR=aports/.git cd aports; git pull; } \
|
|
|
|
|| git clone https://gitlab.alpinelinux.org/alpine/aports.git
|
2021-11-12 17:28:59 +00:00
|
|
|
|
|
|
|
# Mounts release into /work of the builder container to build all
|
2022-10-03 16:41:29 +00:00
|
|
|
build: packages distfiles
|
2022-09-05 09:55:07 +00:00
|
|
|
podman run -it --rm \
|
2021-11-12 17:28:59 +00:00
|
|
|
-v ${PWD}/distfiles:/var/cache/distfiles \
|
|
|
|
-v ${PWD}/packages:/home/alpine/packages \
|
2022-10-03 16:41:29 +00:00
|
|
|
-v ${PWD}/aports:/home/alpine/aports \
|
2022-10-03 18:24:01 +00:00
|
|
|
-v ${PWD}/kubezero:/home/alpine/kubezero \
|
2022-03-25 11:06:28 +00:00
|
|
|
-v ${HOME}/.gitconfig/:/home/alpine/.gitconfig:ro \
|
|
|
|
-v ${HOME}/.abuild/:/home/alpine/.abuild:ro \
|
2022-10-03 16:41:29 +00:00
|
|
|
public.ecr.aws/zero-downtime/alpine-builder:${BUILDER} $(PKG)
|
2021-11-12 17:28:59 +00:00
|
|
|
|
2022-05-13 21:16:13 +00:00
|
|
|
download:
|
|
|
|
aws s3 sync s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ packages/work/x86_64/ --exclude APKINDEX.tar.gz
|
|
|
|
|
2022-09-06 11:30:04 +00:00
|
|
|
invalidate:
|
|
|
|
aws cloudfront create-invalidation --distribution $(CF_DIST) --paths "/alpine/*"
|
|
|
|
|
|
|
|
upload: invalidate
|
2022-10-03 18:24:01 +00:00
|
|
|
aws s3 sync --delete packages/kubezero/x86_64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --exclude APKINDEX.tar.gz
|
|
|
|
aws s3 sync --delete packages/kubezero/aarch64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/aarch64/ --exclude APKINDEX.tar.gz
|
|
|
|
aws s3 cp packages/kubezero/x86_64/APKINDEX.tar.gz s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --cache-control max-age=1
|
|
|
|
aws s3 cp packages/kubezero/aarch64/APKINDEX.tar.gz s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/aarch64/ --cache-control max-age=1
|