-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
47 lines (37 loc) · 1.3 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
TAG := "v$(shell cat ./VERSION)"
.PHONY: test
test:
$(MAKE) -C generatorreceiver test
.PHONY: lint
lint:
$(MAKE) -C generatorreceiver lint
.PHONY: add-tag
add-tag:
@[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 )
@echo "Adding tag ${TAG}"
@git tag -a ${TAG} -m "Version ${TAG}"
@git tag -a generatorreceiver/${TAG} -m "Version ${TAG} for module generatorreceiver"
.PHONY: push-tag
push-tag:
@[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 )
@echo "Pushing tag ${TAG}"
@git push git@github.com:lightstep/telemetry-generator.git ${TAG}
@git push git@github.com:lightstep/telemetry-generator.git generatorreceiver/${TAG}
.PHONY: install-otel-builder
install-otel-builder:
GO111module=on go install go.opentelemetry.io/collector/cmd/builder@v0.88.0
.PHONY: build
build: install-otel-builder
builder --config=config/builder-config.yml --output-path=./dist
.PHONY: docker-build
docker-build:
docker build . -f ./Dockerfile -t local-telemetry-generator-demo
docker-run:
docker run --rm -e LS_ACCESS_TOKEN \
-e LS_ACCESS_TOKEN_INTERNAL \
-e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT \
-e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_INTERNAL \
--env TOPO_FILE=/etc/otel/hipster_shop.yaml \
local-telemetry-generator-demo:latest
run-local:
dist/telemetry-generator --config config/collector-config.yml