dashboard/Makefile

59 lines
1.7 KiB
Makefile
Raw Normal View History

2019-04-25 11:56:34 +00:00
UTILS_PATH := build_utils
2021-01-22 13:05:28 +00:00
SWAGGER_SCHEMES_PATH := schemes/swag/v2 schemes/claim-management/v0 schemes/questionary/v0 schemes/questionary-aggr-proxy/v0 schemes/swag-analytics/v1 schemes/dark-api/v0 schemes/messages/v0 schemes/url-shortener/v0 schemes/swag-wallets/v0 schemes/organizations/v0 schemes/sender/v0
2019-08-12 13:34:18 +00:00
SUBMODULES = $(UTILS_PATH) $(SWAGGER_SCHEMES_PATH)
2019-04-25 11:56:34 +00:00
2018-11-30 13:26:03 +00:00
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
UTILS_PATH := build_utils
TEMPLATES_PATH := .
WORKDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
2018-11-30 13:26:03 +00:00
# Name of the service
SERVICE_NAME := dashboard
# 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-04-02 11:56:34 +00:00
REGISTRY ?= dr2.rbkmoney.com
2018-11-30 13:26:03 +00:00
# Base image for the service
BASE_IMAGE_NAME := service-fe
2020-09-22 09:21:58 +00:00
BASE_IMAGE_TAG := 647d66a59ba89ea42b326ca5156f5d1e1395febc
2018-11-30 13:26:03 +00:00
2021-07-23 15:06:35 +00:00
BUILD_IMAGE_TAG := 25c031edd46040a8745334570940a0f0b2154c5c
2018-11-30 13:26:03 +00:00
GIT_SSH_COMMAND :=
2020-04-20 17:35:06 +00:00
DOCKER_RUN_OPTS = -e GIT_SSH_COMMAND='$(GIT_SSH_COMMAND)' -e NG_CLI_ANALYTICS=ci -e NPM_TOKEN='$(GITHUB_TOKEN)'
2018-11-30 13:26:03 +00:00
2020-03-30 13:40:22 +00:00
CALL_W_CONTAINER := init test build clean submodules
2018-11-30 13:26:03 +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)
2020-03-30 13:40:22 +00:00
init:
2020-04-20 17:35:06 +00:00
echo -e "//npm.pkg.github.com/:_authToken=$(NPM_TOKEN)" >> .npmrc
npm ci
2020-03-30 13:40:22 +00:00
npm run codegen
2018-11-30 13:26:03 +00:00
2020-03-30 13:40:22 +00:00
build:
2021-07-23 15:06:35 +00:00
npm run ci:check
2020-05-12 09:03:39 +00:00
npm run build
2018-11-30 13:26:03 +00:00
clean:
rm -rf dist
test:
2021-07-23 15:06:35 +00:00
docker run --name $(SERVICE_NAME)_$(shell python -c 'from random import randint; print(randint(100000, 999999));')_test --rm -v $(WORKDIR):/usr/src/app:z zenika/alpine-chrome:with-node npm run ci:test