mirror of
https://git.chefkoch.net/pub/make-deploy
synced 2025-05-14 19:43:24 +00:00
add mandatory variables
This commit is contained in:
parent
27f1575a20
commit
f32faac646
2 changed files with 14 additions and 1 deletions
14
Makefile
14
Makefile
|
@ -12,7 +12,19 @@ include make-deploy/helm.mk
|
||||||
self-update:
|
self-update:
|
||||||
@- git submodule update --remote
|
@- git submodule update --remote
|
||||||
|
|
||||||
deploy: build test upload pre-deploy pre-local pull start post-local post-deploy reload
|
deploy: mandatory build test upload pre-deploy pre-local pull start post-local post-deploy reload
|
||||||
|
|
||||||
|
mandatory:
|
||||||
|
@- echo "\n### mandatory check"
|
||||||
|
ifndef MANDATORY-$(DEPLOY_TYPE)
|
||||||
|
$(error MANDATORY-$(DEPLOY_TYPE) is not defined)
|
||||||
|
endif
|
||||||
|
@ $(foreach var,$(MANDATORY), \
|
||||||
|
if test -z "${$(var)}"; then \
|
||||||
|
echo "Missing mandatory variable: $(var)"; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
ifneq (,$(wildcard build.sh))
|
ifneq (,$(wildcard build.sh))
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
MANDATORY-compose = DEPLOY_HOSTS DEPLOY_TYPE TAG
|
||||||
pull-compose:
|
pull-compose:
|
||||||
@- echo "\n### pulling image(s)"
|
@- echo "\n### pulling image(s)"
|
||||||
@- $(foreach host,$(DEPLOY_HOSTS), \
|
@- $(foreach host,$(DEPLOY_HOSTS), \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue