This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
/
Makefile
52 lines (43 loc) · 1.45 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
41
42
43
44
45
46
47
48
49
50
51
52
UID = $(shell id -u $(USER))
GID = $(shell id -g $(USER))
help: # Show this message.
@echo "\nAvailable Targets:\n"
@sed -ne '/@sed/!s/# //p' $(MAKEFILE_LIST)
test: # Run all unit tests.
@docker run --rm \
-w $$PWD \
-v $$PWD:$$PWD \
-u $(UID):$(GID) \
--entrypoint bash \
bitnami/jsonnet:0.16.0 \
tests.sh
test-update: # Run all unit tests while copying test_output.json to compiled.json file.
@docker run --rm \
-w $$PWD \
-v $$PWD:$$PWD \
-u $(UID):$(GID) \
--entrypoint bash \
bitnami/jsonnet:0.16.0 \
tests.sh update
E2E_GRAFANA_VERSION ?= 7.1.1
e2e: # Run all end-to-end tests.
GRAFANA_VERSION=${E2E_GRAFANA_VERSION} \
docker-compose -f e2e/docker-compose.yml up \
--abort-on-container-exit \
--exit-code-from e2e
e2e-dev: # Run e2e tests in Cypress test runner.
GRAFANA_VERSION=${E2E_GRAFANA_VERSION} \
DISPLAY=$$(ipconfig getifaddr en0):0 \
docker-compose -f e2e/docker-compose.dev.yml up \
--abort-on-container-exit \
--exit-code-from e2e
gen-api-docs: # Generate api-docs.md from source code comments.
@docker run --rm \
-w $$PWD \
-v $$PWD:$$PWD \
trotttrotttrott/jsonnetdoc:ece56aa \
grafonnet --markdown \
> docs/api-docs.md
spec-import: # Import generated libraries from https://github.com/grafana/dashboard-spec.
svn export https://github.com/grafana/dashboard-spec/branches/_gen/_gen/7.0/jsonnet grafonnet-7.0 --force
.PHONY: help test test-update e2e gen-api-docs spec-import