-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathJustfile
More file actions
68 lines (52 loc) · 2.12 KB
/
Justfile
File metadata and controls
68 lines (52 loc) · 2.12 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
default:
@just --list
check-licenses:
go-licenses check --disallowed_types=forbidden,restricted,reciprocal,permissive,unknown .
lint-api:
redocly lint
lint-code:
golangci-lint run
lint-dockerfile:
hadolint docker/Dockerfile
hadolint docker/debug.Dockerfile
lint-helmchart:
#!/usr/bin/env bash
helm lint ./charts/heimdall
helm template --kube-version 1.32.0 --set crds.enabled=true ./charts/heimdall > /tmp/decision-config.yaml
helm template --kube-version 1.32.0 --set crds.enabled=true --set operationMode=proxy ./charts/heimdall > /tmp/proxy-config.yaml
kubeconform \
-schema-location default \
-schema-location "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/{{{{ .NormalizedKubernetesVersion }}/{{{{ .ResourceKind }}.json" \
--skip RuleSet -kubernetes-version 1.32.0 /tmp/decision-config.yaml
kubeconform \
-schema-location default \
-schema-location "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/{{{{ .NormalizedKubernetesVersion }}/{{{{ .ResourceKind }}.json" \
--skip RuleSet -kubernetes-version 1.32.0 /tmp/proxy-config.yaml
rm /tmp/decision-config.yaml
rm /tmp/proxy-config.yaml
lint: check-licenses lint-api lint-code lint-dockerfile lint-helmchart
dependencies:
go mod tidy
go mod download
go mod verify
test-chart:
helm unittest ./charts/heimdall
test: dependencies
go test -v -coverprofile=coverage.cov -coverpkg=./... ./...
test-all: lint test-chart test
coverage: test
go tool cover -html coverage.cov
build: dependencies
#!/usr/bin/env bash
git_ref=$(git rev-parse --short HEAD)
CGO_ENABLED=0 go build -trimpath -buildvcs=false -ldflags="-buildid= -w -s -X github.com/dadrus/heimdall/version.Version=${git_ref}"
build-image:
#!/usr/bin/env bash
git_ref=$(git rev-parse --short HEAD)
docker build --build-arg VERSION=${git_ref} -t heimdall:local -f docker/Dockerfile .
build-docs-debug-image:
#!/usr/bin/env bash
docker build -t heimdall-docs:local -f docker/docs.Dockerfile .
run-docs: build-docs-debug-image
#!/usr/bin/env bash
docker run -ti --rm -p 1313:1313 -v ./:/opt/heimdall heimdall-docs:local