Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## >>> DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! <<<
##
## This file created by otica from otica.yaml and will be
## overwritten the next time it is run.
##
## Put local Makefile targets in common/makefile_parts/something.mk
##
## >>> DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! <<<
THIS_MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST)))
PATH := ${SCRIPTS_DIR}:${PATH}
# These are subdirectories of the Otica project:
ifndef COMMON
COMMON := ../common
endif
TEMPLATES := ${COMMON}/templates
DATA := ${DATA}/templates
SCRIPTS := ${SCRIPTS}/templates
ARTIFACTS := ${COMMON}/artifacts
## ENVIRONMENT VARIABLE FILES
include ${COMMON}/framework.var
include ${COMMON}/gcp-uit-et-iedo-services.var
include ${COMMON}/common.var
include local.var
# Export all variables:
export
# FRAMEWORK SYNC
ifeq ($(MAKELEVEL),0)
ifndef SKIP_SYNC
_ := $(shell >&2 echo)
ifneq ($(wildcard ${FRAMEWORK_DIR}/.git/),)
_ := $(shell >&2 echo Updating Otica cloud framework from Git into ${FRAMEWORK_DIR}...)
_ := $(shell cd ${FRAMEWORK_DIR}; git pull ${FRAMEWORK_GIT_REMOTE} ${FRAMEWORK_GIT_BRANCH}; git checkout ${FRAMEWORK_GIT_BRANCH})
else
_ := $(shell >&2 echo Updating Otica cloud framework in ${FRAMEWORK_DIR}...)
_ := $(shell mkdir -p ${FRAMEWORK_DIR} && curl --retry 3 -s https://storage.googleapis.com/${FRAMEWORK_BUCKET}/framework.tar.gz?random=$$(date +%s) | tar -xzf - -C ${FRAMEWORK_DIR})
_ := $(shell >&2 echo - framework version: $$(cat ${FRAMEWORK_DIR}/sha.txt))
endif
endif
endif
# END FRAMEWORK SYNC
## FRAMEWORK-SUPPLIED MAKEFILES
include ${FRAMEWORK_DIR}/makefile_parts/framework.mk
include ${FRAMEWORK_DIR}/makefile_parts/vault.mk
include ${FRAMEWORK_DIR}/makefile_parts/config-gcp.mk
include ${FRAMEWORK_DIR}/makefile_parts/helm-develop.mk
## END OF FRAMEWORK-SUPPLIED MAKEFILES
## LOCAL MAKEFILES IN COMMON
## END OF LOCAL MAKEFILES
# Get the release channel name from git branches,
# i.e. alpha, beta, and stable
# note: master branch is mapped to 'stable'
ifndef COMMIT_BRANCH
COMMIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
endif
export RELEASE_CHANNEL=$(shell echo ${COMMIT_BRANCH} | sed 's/master/stable/')