mirror of
https://github.com/valitydev/koffing.git
synced 2024-11-06 01:05:19 +00:00
54 lines
1.1 KiB
Makefile
54 lines
1.1 KiB
Makefile
SUBMODULES = build_utils
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
|
|
UTILS_PATH := build_utils
|
|
TEMPLATES_PATH := .
|
|
|
|
# Name of the service
|
|
SERVICE_NAME := koffing
|
|
# Service image default tag
|
|
SERVICE_IMAGE_TAG ?= $(shell git rev-parse HEAD)
|
|
# The tag for service image to be pushed with
|
|
SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
|
|
|
|
REGISTRY ?= dr2.rbkmoney.com
|
|
|
|
# Base image for the service
|
|
BASE_IMAGE_NAME := service-fe
|
|
BASE_IMAGE_TAG := 2b4570bc1d9631c10aaed2132eb87eb9003f3471
|
|
|
|
BUILD_IMAGE_TAG := b04c5291d101132e53e578d96e1628d2e6dab0c0
|
|
|
|
CALL_W_CONTAINER := init build clean submodules
|
|
|
|
.PHONY: $(CALL_W_CONTAINER)
|
|
|
|
all: build
|
|
|
|
-include $(UTILS_PATH)/make_lib/utils_image.mk
|
|
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
|
|
|
$(SUBTARGETS): %/.git: %
|
|
git submodule update --init $<
|
|
touch $@
|
|
|
|
submodules: $(SUBTARGETS)
|
|
|
|
init:
|
|
npm ci
|
|
|
|
build: check
|
|
npm run build
|
|
|
|
clean:
|
|
rm -rf dist
|
|
|
|
.state: build_image
|
|
echo $(SERVICE_IMAGE_TAG) > $@
|
|
|
|
test: .state
|
|
docker run --rm $(SERVICE_IMAGE_NAME):$(shell cat .state) nginx -T -c /etc/nginx/nginx.conf
|
|
|
|
check:
|
|
npm run check
|