2018-08-02 13:41:30 +00:00
|
|
|
SUBMODULES = build_utils
|
|
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
|
|
|
|
|
|
UTILS_PATH := build_utils
|
|
|
|
TEMPLATES_PATH := .
|
|
|
|
|
|
|
|
# Name of the service
|
|
|
|
SERVICE_NAME := control-center
|
|
|
|
# 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)
|
|
|
|
|
2019-03-19 16:26:39 +00:00
|
|
|
REGISTRY ?= dr2.rbkmoney.com
|
|
|
|
|
2018-08-02 13:41:30 +00:00
|
|
|
# Base image for the service
|
|
|
|
BASE_IMAGE_NAME := service-fe
|
2019-03-19 16:26:39 +00:00
|
|
|
BASE_IMAGE_TAG := 2b4570bc1d9631c10aaed2132eb87eb9003f3471
|
2018-08-02 13:41:30 +00:00
|
|
|
|
2019-03-19 16:26:39 +00:00
|
|
|
BUILD_IMAGE_TAG := f3732d29a5e622aabf80542b5138b3631a726adb
|
2018-08-02 13:41:30 +00:00
|
|
|
|
|
|
|
GIT_SSH_COMMAND :=
|
2019-12-16 16:22:16 +00:00
|
|
|
DOCKER_RUN_OPTS = -e GIT_SSH_COMMAND='$(GIT_SSH_COMMAND)' -e NG_CLI_ANALYTICS=ci -e NPM_TOKEN='$(GITHUB_TOKEN)'
|
2018-08-02 13:41:30 +00:00
|
|
|
|
2019-12-24 13:54:27 +00:00
|
|
|
|
2019-01-17 10:12:18 +00:00
|
|
|
CALL_W_CONTAINER := init build clean submodules
|
2018-08-02 13:41:30 +00:00
|
|
|
|
|
|
|
.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:
|
2020-04-06 13:58:30 +00:00
|
|
|
echo -e "//npm.pkg.github.com/:_authToken=$(NPM_TOKEN)" >> .npmrc
|
|
|
|
npm ci
|
2018-08-02 13:41:30 +00:00
|
|
|
|
2020-01-31 18:00:10 +00:00
|
|
|
compile: compile-damsel compile-machinegun compile-fistful compile-messages compile-file-storage compile-ank
|
2018-08-02 13:41:30 +00:00
|
|
|
|
2019-03-15 11:11:29 +00:00
|
|
|
build: check lint compile
|
|
|
|
npm run build
|
2018-08-02 13:41:30 +00:00
|
|
|
|
2019-03-15 11:11:29 +00:00
|
|
|
clean-compile: clean compile
|
2018-08-02 13:41:30 +00:00
|
|
|
|
2019-03-15 11:11:29 +00:00
|
|
|
clean:
|
2020-01-31 18:00:10 +00:00
|
|
|
rm -rf dist src/app/thrift/gen-* src/assets/meta-damsel.json src/app/gen-model src/app/machinegun/gen-* src/app/fistful/gen-* src/app/messages/gen-* src/app/file-storage/gen-* src/app/ank/gen-*
|
2018-10-23 09:31:54 +00:00
|
|
|
|
2019-03-15 11:11:29 +00:00
|
|
|
compile-damsel: damsel-client damsel-model damsel-meta
|
2018-10-23 09:31:54 +00:00
|
|
|
|
2019-03-15 11:11:29 +00:00
|
|
|
damsel-client:
|
2020-01-31 18:00:10 +00:00
|
|
|
@$(foreach file,domain_config payment_processing merch_stat claim_management,echo $(file); thrift -r -gen js:node,runtime_package=woody_js/dist/thrift -o ./src/app/thrift-services/damsel ./node_modules/damsel/proto/$(file).thrift;)
|
2018-10-23 09:31:54 +00:00
|
|
|
|
2019-01-10 13:00:48 +00:00
|
|
|
damsel-meta:
|
|
|
|
npm run damsel-meta
|
|
|
|
|
|
|
|
damsel-model:
|
|
|
|
npm run damsel-model
|
2018-10-23 09:31:54 +00:00
|
|
|
|
2019-03-15 11:11:29 +00:00
|
|
|
compile-machinegun: machinegun-model machinegun-client
|
|
|
|
|
|
|
|
machinegun-client:
|
2020-01-31 18:00:10 +00:00
|
|
|
@$(foreach file,state_processing,echo $(file); thrift -r -gen js:node,runtime_package=woody_js/dist/thrift -o ./src/app/thrift-services/machinegun ./node_modules/machinegun_proto/proto/$(file).thrift;)
|
2019-03-15 11:11:29 +00:00
|
|
|
|
|
|
|
machinegun-model:
|
|
|
|
npm run machinegun-model
|
|
|
|
|
|
|
|
compile-fistful: fistful-model fistful-client
|
|
|
|
|
|
|
|
fistful-client:
|
2020-01-31 18:00:10 +00:00
|
|
|
@$(foreach file,withdrawal_session fistful_admin fistful_stat,echo $(file); thrift -r -gen js:node,runtime_package=woody_js/dist/thrift -o ./src/app/thrift-services/fistful ./node_modules/fistful-proto/proto/$(file).thrift;)
|
2019-03-15 11:11:29 +00:00
|
|
|
|
|
|
|
fistful-model:
|
|
|
|
npm run fistful-model
|
|
|
|
|
2020-01-31 18:00:10 +00:00
|
|
|
compile-messages: messages-model messages-client
|
|
|
|
|
|
|
|
messages-client:
|
|
|
|
@$(foreach file,messages,echo $(file); thrift -r -gen js:node,runtime_package=woody_js/dist/thrift -o ./src/app/thrift-services/messages ./node_modules/messages-proto/proto/$(file).thrift;)
|
|
|
|
|
|
|
|
messages-model:
|
|
|
|
npm run messages-model
|
|
|
|
|
|
|
|
compile-file-storage: file-storage-model file-storage-client
|
|
|
|
|
|
|
|
file-storage-client:
|
|
|
|
@$(foreach file,file_storage,echo $(file); thrift -r -gen js:node,runtime_package=woody_js/dist/thrift -o ./src/app/thrift-services/file-storage ./node_modules/file-storage-proto/proto/$(file).thrift;)
|
|
|
|
|
|
|
|
file-storage-model:
|
|
|
|
npm run file-storage-model
|
|
|
|
|
|
|
|
compile-ank: ank-model ank-client
|
|
|
|
|
|
|
|
ank-client:
|
|
|
|
@$(foreach file,questionary_manager,echo $(file); thrift -r -gen js:node,runtime_package=woody_js/dist/thrift -o ./src/app/thrift-services/ank ./node_modules/ank-proto/proto/$(file).thrift;)
|
|
|
|
|
|
|
|
ank-model:
|
|
|
|
npm run ank-model
|
|
|
|
|
2018-08-21 13:15:51 +00:00
|
|
|
lint:
|
|
|
|
npm run lint
|
2019-01-17 10:12:18 +00:00
|
|
|
|
|
|
|
check:
|
|
|
|
npm run check
|