-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
22 lines (18 loc) · 868 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PROJNAME := kubernetes-toolkit
KUBERNETES_VERSION := 1.32.1
GOOS ?= $(if $(TARGETOS),$(TARGETOS),linux)
GOARCH ?= $(if $(TARGETARCH),$(TARGETARCH),amd64)
BUILDPLATFORM ?= $(GOOS)/$(GOARCH)
# ############################################################################################################
# Local tasks
# ############################################################################################################
initialise:
pre-commit --version || brew install pre-commit
pre-commit install --install-hooks
pre-commit run -a
build:
docker buildx build --build-arg BUILDPLATFORM=$(BUILDPLATFORM) --build-arg TARGETARCH=$(GOARCH) \
--build-arg KUBERNETES_VERSION=$(KUBERNETES_VERSION) \
-t local/$(PROJNAME):$(KUBERNETES_VERSION) .
scan: build
trivy --light -s "UNKNOWN,MEDIUM,HIGH,CRITICAL" --exit-code 1 local/$(PROJNAME):$(KUBERNETES_VERSION)