ci: fix build flow

This commit is contained in:
Stefan Reimer 2022-03-25 12:06:28 +01:00
parent 1007b5afa5
commit 28ac461960
2 changed files with 11 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
aports aports
distfiles distfiles
packages packages
work

View File

@ -1,5 +1,6 @@
BUILDER ?= v3.15.1-4 BUILDER ?= v3.15.2-1
RELEASE := v3.15 RELEASE := v3.15
PKG := '*'
.PHONY: builder aports_update .PHONY: builder aports_update
@ -9,6 +10,8 @@ packages:
mkdir -p packages mkdir -p packages
distfiles: distfiles:
mkdir -p distfiles mkdir -p distfiles
work:
mkdir -p work
aports: aports:
git clone https://gitlab.alpinelinux.org/alpine/aports.git --depth=1 git clone https://gitlab.alpinelinux.org/alpine/aports.git --depth=1
@ -17,14 +20,15 @@ aports_update: aports
GIT_DIR=aports/.git git pull origin master GIT_DIR=aports/.git git pull origin master
# Mounts release into /work of the builder container to build all # Mounts release into /work of the builder container to build all
build: packages distfiles aports_update build: packages distfiles aports_update work
podman run -ti --rm \ podman run -ti --rm \
-v ${PWD}/distfiles:/var/cache/distfiles \ -v ${PWD}/distfiles:/var/cache/distfiles \
-v ${PWD}/packages:/home/alpine/packages \ -v ${PWD}/packages:/home/alpine/packages \
-v ${HOME}/.gitconfig/:/home/alpine/.gitconfig \ -v ${PWD}/work/:/home/alpine/work \
-v ${HOME}/.abuild/:/home/alpine/.abuild \ -v ${PWD}/$(RELEASE)/:/home/alpine/src:ro \
-v ${PWD}/$(RELEASE)/:/home/alpine/work \ -v ${HOME}/.gitconfig/:/home/alpine/.gitconfig:ro \
public.ecr.aws/zero-downtime/alpine-builder:${BUILDER} -v ${HOME}/.abuild/:/home/alpine/.abuild:ro \
public.ecr.aws/zero-downtime/alpine-builder:${BUILDER} $(PKG)
upload: upload:
aws s3 cp --recursive packages/work/x86_64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --exclude APKINDEX.tar.gz aws s3 cp --recursive packages/work/x86_64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --exclude APKINDEX.tar.gz