forked from mdelapenya/junit2otlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (43 loc) · 1.22 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
53
54
55
56
define setup_demo_env
$(eval ENV_FILE := demos/$(1)/demo.env)
@echo ">> Setting up $(1) env from $(ENV_FILE)"
$(eval include $(ENV_FILE))
$(eval export $(shell sed 's/=.*//' $(ENV_FILE)))
rm -fr demos/$(1)/build
endef
define start_demo
mkdir demos/$(1)/build
touch demos/$(1)/build/tests.json
docker compose -f demos/$(1)/docker-compose.yml up -d
env | grep OTEL
endef
define stop_demo
docker compose -f demos/$(1)/docker-compose.yml down --remove-orphans --volumes
rm -fr demos/$(1)/build
endef
build-docker-image:
docker build -t mdelapenya/junit2otlp:latest .
push-docker-image:
docker push mdelapenya/junit2otlp:latest
demo-start-elastic:
$(call setup_demo_env,elastic)
$(call start_demo,elastic)
demo-stop-elastic:
$(call stop_demo,elastic)
demo-start-jaeger:
$(call setup_demo_env,jaeger)
$(call start_demo,jaeger)
demo-stop-jaeger:
$(call stop_demo,jaeger)
demo-start-prometheus:
$(call setup_demo_env,prometheus)
$(call start_demo,prometheus)
demo-stop-prometheus:
$(call stop_demo,prometheus)
demo-start-zipkin:
$(call setup_demo_env,zipkin)
$(call start_demo,zipkin)
demo-stop-zipkin:
$(call stop_demo,zipkin)
test:
go run gotest.tools/gotestsum --debug --format short-verbose -- -timeout=5m ./...