alertmanager/doc/alertmanager-mixin/Makefile
gotjosh 07b89eb117
Mixin: Pin the mixtool version in CircleCI
In mixtool, the tip of master broke for our mixin - I have managed to trace it down and opened a PR (see https://github.com/grafana/dashboard-linter/pull/143) but for now, let's pin the version to make sure our CI is not affected.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-08-03 16:15:26 +01:00

32 lines
828 B
Makefile

JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 1 --string-style s --comment-style s
ALERTMANAGER_ALERTS := alertmanager_alerts.yaml
default: vendor build dashboards_out
all: fmt build
vendor:
jb install
fmt:
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNET_FMT) -i
lint: build
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
while read f; do \
$(JSONNET_FMT) "$$f" | diff -u "$$f" -; \
done
mixtool lint mixin.libsonnet
dashboards_out: mixin.libsonnet config.libsonnet $(wildcard dashboards/*)
@mkdir -p dashboards_out
jsonnet -J vendor -m dashboards_out dashboards.jsonnet
build: vendor
mixtool generate alerts mixin.libsonnet > $(ALERTMANAGER_ALERTS)
clean:
rm -rf $(ALERTMANAGER_ALERTS)