-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
40 lines (34 loc) · 1.13 KB
/
Makefile
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
JOB ?= tarantool
POLICY ?= autogen
MEASUREMENT ?= tarantool_http
WITH_INSTANCE_VARIABLE ?= FALSE
OUTPUT_STATIC_DASHBOARD ?= dashboard.json
OUTPUT ?= dashboard.json
TITLE ?=
.PHONY: build-deps
build-deps:
go install github.com/google/go-jsonnet/cmd/[email protected]
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
jb install
.PHONY: build
build:
ifndef CONFIG
@echo 1>&2 "CONFIG=config.yml must be set"
false
endif
jsonnet -J ./vendor -J . \
-e "local build = import 'dashboard/build/from_config.libsonnet'; local file = importstr '${CONFIG}'; build(std.parseYaml(file))" \
-o ${OUTPUT}
.PHONY: test-deps
test-deps: build-deps
go install github.com/google/go-jsonnet/cmd/[email protected]
wget -qO- "https://github.com/prometheus/prometheus/releases/download/v2.40.4/prometheus-2.40.4.linux-amd64.tar.gz" \
| tar xvzf - "prometheus-2.40.4.linux-amd64"/promtool --strip-components=1
.PHONY: run-tests
run-tests:
./tests.sh
./promtool test rules example_cluster/prometheus/test_alerts.yml
./promtool test rules example_cluster/prometheus/test_cartridge_alerts.yml
.PHONY: update-tests
update-tests:
./tests.sh update