KubeZero/Makefile

40 lines
908 B
Makefile
Raw Normal View History

2022-04-08 15:09:40 +00:00
VERSION ?= 1.22.8
ALPINE_VERSION ?= 3.15
REGISTRY := public.ecr.aws/zero-downtime
REPOSITORY := kubezero-admin
TAG := $(REPOSITORY):v$(VERSION)
KUBE_VERSION := $(shell echo $(VERSION) | sed -e 's/\.[[:digit:]]*$$//')
2022-04-08 15:09:40 +00:00
.PHONY: build push clean scan
2022-04-08 15:09:40 +00:00
all: build push
2022-04-08 15:09:40 +00:00
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:
2021-01-27 12:20:11 +00:00
./scripts/update_helm.sh
2021-01-21 10:53:53 +00:00
2022-04-08 15:09:40 +00:00
update-chart-docs:
2021-01-21 10:53:53 +00:00
for c in charts/*; do \
[[ $$c =~ "kubezero-lib" ]] && continue ; \
[[ $$c =~ "kubeadm" ]] && continue ; \
helm-docs -c $$c ; \
done
2021-01-27 12:20:11 +00:00
2022-04-08 15:09:40 +00:00
publish-charts:
2021-01-27 12:20:11 +00:00
./scripts/publish.sh
2022-04-08 15:09:40 +00:00