2022-07-12 11:15:51 +00:00
|
|
|
BUILDER ?= v3.16.0
|
|
|
|
RELEASE := v3.16
|
2022-03-25 11:06:28 +00:00
|
|
|
PKG := '*'
|
2021-11-12 17:28:59 +00:00
|
|
|
|
2022-05-13 21:16:13 +00:00
|
|
|
.PHONY: builder aports_update download upload
|
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:
|
|
|
|
mkdir -p packages
|
|
|
|
distfiles:
|
|
|
|
mkdir -p distfiles
|
2022-03-25 11:06:28 +00:00
|
|
|
work:
|
|
|
|
mkdir -p work
|
2021-11-12 17:28:59 +00:00
|
|
|
|
|
|
|
aports:
|
2022-01-24 10:57:45 +00:00
|
|
|
git clone https://gitlab.alpinelinux.org/alpine/aports.git --depth=1
|
2022-05-18 12:12:38 +00:00
|
|
|
|
2021-11-12 17:28:59 +00:00
|
|
|
aports_update: aports
|
2022-08-16 12:41:09 +00:00
|
|
|
GIT_DIR=aports/.git cd aports; git reset --hard
|
|
|
|
GIT_DIR=aports/.git cd aports; git fetch origin -p
|
|
|
|
GIT_DIR=aports/.git cd aports; git pull -p --squash origin master
|
2021-11-12 17:28:59 +00:00
|
|
|
|
|
|
|
# Mounts release into /work of the builder container to build all
|
2022-03-25 11:06:28 +00:00
|
|
|
build: packages distfiles aports_update work
|
2022-04-13 17:07:07 +00:00
|
|
|
mkdir -p /tmp/_alpine-work
|
2022-01-24 12:29:37 +00:00
|
|
|
podman run -ti --rm \
|
2021-11-12 17:28:59 +00:00
|
|
|
-v ${PWD}/distfiles:/var/cache/distfiles \
|
|
|
|
-v ${PWD}/packages:/home/alpine/packages \
|
2022-04-13 17:07:07 +00:00
|
|
|
-v /tmp/_alpine-work:/home/alpine/work \
|
2022-03-25 11:06:28 +00:00
|
|
|
-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)
|
2022-04-13 17:07:07 +00:00
|
|
|
doas rm -rf /tmp/_alpine-work
|
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
|
|
|
|
|
2021-11-12 17:28:59 +00:00
|
|
|
upload:
|
2022-05-03 11:16:03 +00:00
|
|
|
aws s3 sync --delete packages/work/x86_64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --exclude APKINDEX.tar.gz
|
2021-12-05 17:05:00 +00:00
|
|
|
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
|