forked from kubescape/kubescape
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 911 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (24 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.PHONY: test all build sync-vap
# default task invoked while running make
all: build
export CGO_ENABLED=0
build:
go build -v .
test:
go test -v ./...
# cel-admission-library bundle vendored under the cel package so //go:embed can
# bake it into the binary. sync-vap refreshes that copy from a pinned release so
# it stays reproducible instead of hand-maintained. Bump CEL_LIBRARY_VERSION to
# vendor a newer bundle.
CEL_VAPDATA_DIR := core/pkg/opaprocessor/cel/vapdata
CEL_LIBRARY_VERSION := v0.13
CEL_LIBRARY_BASE_URL := https://github.com/kubescape/cel-admission-library/releases/download/$(CEL_LIBRARY_VERSION)
CEL_VAP_FILES := \
kubescape-validating-admission-policies.yaml \
basic-control-configuration.yaml \
policy-configuration-definition.yaml
sync-vap:
@for f in $(CEL_VAP_FILES); do \
echo "syncing $$f"; \
curl -fsSL "$(CEL_LIBRARY_BASE_URL)/$$f" -o "$(CEL_VAPDATA_DIR)/$$f"; \
done