ci: Integrate ci-tools-lib

This commit is contained in:
Stefan Reimer 2022-05-11 12:00:53 +02:00
parent 904b19bcb4
commit b4493da39f
2 changed files with 5 additions and 25 deletions

View File

@ -1,9 +1,9 @@
ARG ALPINE_VERSION ARG ALPINE_VERSION=3.15
FROM alpine:${ALPINE_VERSION} FROM alpine:${ALPINE_VERSION}
ARG ALPINE_VERSION ARG ALPINE_VERSION
ARG KUBE_VERSION ARG KUBE_VERSION=1.22
RUN cd /etc/apk/keys && \ RUN cd /etc/apk/keys && \
wget "https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub" && \ wget "https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub" && \

View File

@ -1,28 +1,8 @@
VERSION ?= 1.22.8
ALPINE_VERSION ?= 3.15
REGISTRY := public.ecr.aws/zero-downtime REGISTRY := public.ecr.aws/zero-downtime
REPOSITORY := kubezero-admin IMAGE := kubezero-admin
TAG := $(REPOSITORY):v$(VERSION) REGION := us-east-1
KUBE_VERSION := $(shell echo $(VERSION) | sed -e 's/\.[[:digit:]]*$$//')
.PHONY: build push clean scan include .ci/podman.mk
all: build push
build:
podman build --rm --build-arg KUBE_VERSION=$(KUBE_VERSION) --build-arg ALPINE_VERSION=$(ALPINE_VERSION) -t $(TAG) .
push:
aws ecr-public get-login-password --region us-east-1 | podman login --username AWS --password-stdin $(REGISTRY)
podman tag $(TAG) $(REGISTRY)/$(TAG)
podman push $(REGISTRY)/$(TAG)
clean:
podman image prune -f
scan:
podman system service&
sleep 5; trivy $(TAG)
update-charts: update-charts:
./scripts/update_helm.sh ./scripts/update_helm.sh