File size: 1,117 Bytes
6380833 | 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 | # A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: test-local
test-local: ## Run quickstart tests against a local stack with debug ports exposed
$(call print-target)
$(MAKE) env-local-down
$(MAKE) env-local-up
curl --retry 10 --retry-max-time 120 --retry-all-errors http://localhost:40000/healthz
OPENMETER_ADDRESS=http://localhost:48888 go test -count=1 -v ./...
$(MAKE) env-local-down
.PHONY: env-local-down
env-local-down:
$(call print-target)
docker compose \
-f docker-compose.yaml \
-f docker-compose.debug-ports.yaml \
down
.PHONY: env-local-up
env-local-up:
$(call print-target)
docker compose \
-f docker-compose.yaml \
-f docker-compose.debug-ports.yaml \
up -d --force-recreate
.PHONY: help
.DEFAULT_GOAL := help
help:
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# Variable outputting/exporting rules
var-%: ; @echo $($*)
varexport-%: ; @echo $*=$($*)
define print-target
@printf "Executing target: \033[36m$@\033[0m\n"
endef
|