2016-09-21 19:48:57 +00:00
|
|
|
PYVERSION=2.7
|
|
|
|
NAME=senpycommunity
|
|
|
|
REPO=gsiupm
|
|
|
|
PLUGINS= $(filter %/, $(wildcard */))
|
2018-06-15 07:46:15 +00:00
|
|
|
IMAGENAME=gsiupm/senpy-plugins-community
|
|
|
|
DOCKER_FLAGS=-p 5000:5000
|
2018-06-14 17:38:08 +00:00
|
|
|
|
|
|
|
ifdef SENPY_FOLDER
|
2018-06-15 07:46:15 +00:00
|
|
|
DOCKER_FLAGS+= -v $(realpath $(SENPY_FOLDER)):/usr/src/app/
|
2018-06-14 17:38:08 +00:00
|
|
|
endif
|
2016-09-21 19:48:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: build run
|
|
|
|
|
|
|
|
test-%:
|
2018-06-15 14:44:25 +00:00
|
|
|
docker run $(DOCKER_FLAGS) -v $$PWD/$*:/senpy-plugins/ -v $$PWD/data:/data/ --rm $(IMAGEWTAG) --only-test $(TEST_FLAGS)
|
2016-09-21 19:48:57 +00:00
|
|
|
|
2018-06-14 17:38:08 +00:00
|
|
|
test: test-.
|
2016-09-21 19:48:57 +00:00
|
|
|
|
2018-06-15 07:46:15 +00:00
|
|
|
clean-docker:
|
2016-09-21 19:48:57 +00:00
|
|
|
@docker ps -a | awk '/$(REPO)\/$(NAME)/{ split($$2, vers, "-"); if(vers[1] != "${VERSION}"){ print $$1;}}' | xargs docker rm 2>/dev/null|| true
|
|
|
|
@docker images | awk '/$(REPO)\/$(NAME)/{ split($$2, vers, "-"); if(vers[1] != "${VERSION}"){ print $$1":"$$2;}}' | xargs docker rmi 2>/dev/null|| true
|
|
|
|
|
2018-06-15 07:46:15 +00:00
|
|
|
.PHONY:: test test-% build-% build test test_pip run clean
|
|
|
|
|
|
|
|
include .makefiles/base.mk
|
|
|
|
include .makefiles/k8s.mk
|
2016-09-21 19:48:57 +00:00
|
|
|
|