Commit baa55ab6 by Oleg Gaidarenko Committed by GitHub

Feature: do dev environment via makefile (#17136)

Simplifies dev environment creation. I also planing to utilize
this logic for the LDAP benchmarking
parent bc3a7181
-include local/Makefile -include local/Makefile
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go test-go test-js test run clean gosec revive .PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go test-go test-js test run clean gosec revive devenv devenv-down
GO := GO111MODULE=on go GO := GO111MODULE=on go
GO_FILES := ./pkg/... GO_FILES := ./pkg/...
...@@ -84,6 +84,19 @@ revive: scripts/go/bin/revive ...@@ -84,6 +84,19 @@ revive: scripts/go/bin/revive
-config ./scripts/go/configs/revive.toml \ -config ./scripts/go/configs/revive.toml \
$(GO_FILES) $(GO_FILES)
# create docker-compose file with provided sources and start them
# example: make devenv sources=postgres,openldap
devenv: devenv-down
$(eval targets := $(shell echo '$(sources)' | tr "," " "))
@cd devenv; \
./create_docker_compose.sh $(targets); \
docker-compose up -d
# drop down the envs
devenv-down:
@cd devenv; docker-compose down;
# TODO recheck the rules and leave only necessary exclusions # TODO recheck the rules and leave only necessary exclusions
gosec: scripts/go/bin/gosec gosec: scripts/go/bin/gosec
@scripts/go/bin/gosec -quiet \ @scripts/go/bin/gosec -quiet \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment