-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 2.05 KB
/
Copy pathMakefile
File metadata and controls
67 lines (52 loc) · 2.05 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
# Default to podman
CONTAINER_RUNTIME ?= podman
.PHONY: metricsdocs
metricsdocs: build-metricsdocs
@[ "${CONFIG_FILE}" ] || ( echo "CONFIG_FILE is not set"; exit 1 )
tools/metricsdocs/_out/metricsdocs \
--config-file $(CONFIG_FILE)
.PHONY: build-metricsdocs
build-metricsdocs:
cd ./tools/metricsdocs && go build -ldflags="-s -w" -o _out/metricsdocs .
.PHONY: promlinter-build
promlinter-build:
${CONTAINER_RUNTIME} build -t ${IMG} test/metrics/prom-metrics-linter
.PHONY: promlinter-push
promlinter-push:
${CONTAINER_RUNTIME} push ${IMG}
.PHONY: monitoringlinter-unit-test
monitoringlinter-unit-test:
go test ./monitoringlinter/...
.PHONY: monitoringlinter-build
monitoringlinter-build:
go build -o bin/ ./monitoringlinter/cmd/monitoringlinter
.PHONY: monitoringlinter-test
monitoringlinter-test: monitoringlinter-build
./monitoringlinter/tests/e2e.sh
.PHONY: lint-markdown
lint-markdown:
echo "Linting markdown files"
podman run -v ${PWD}:/workdir:Z docker.io/davidanson/markdownlint-cli2:v0.13.0 "/workdir/docs/*runbooks/*.md"
.PHONY: build-runbook-sync-downstream
build-runbook-sync-downstream:
cd tools/runbook-sync-downstream && go build -ldflags="-s -w" -o _out/runbook-sync-downstream .
.PHONY: runbook-sync-downstream
runbook-sync-downstream: build-runbook-sync-downstream
tools/runbook-sync-downstream/_out/runbook-sync-downstream
.PHONY: build-runbook-preview
build-runbook-preview:
cd tools/runbook-sync-downstream && go build -ldflags="-s -w" -o _out/runbook-preview ./cmd/preview/
.PHONY: generate-perses-dashboards
generate-perses-dashboards:
go run ./cmd/generate-perses-dashboards/... --out dashboards/perses
.PHONY: verify-perses-dashboards
verify-perses-dashboards: generate-perses-dashboards
@if [ -n "$$(git status --porcelain dashboards/perses/)" ]; then \
echo "ERROR: dashboards/perses/ is out of date. Run 'make generate-perses-dashboards' and commit the result."; \
git status dashboards/perses/; \
git diff dashboards/perses/; \
exit 1; \
fi
.PHONY: test-perses-dashboards
test-perses-dashboards:
go test ./pkg/dashboards/transform/...