generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
36 lines (29 loc) · 1.65 KB
/
Makefile
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
PROJECT_ROOT=.
OPERATOR_ROOT=./components/operator
include ${PROJECT_ROOT}/hack/help.mk
include ${PROJECT_ROOT}/hack/k3d.mk
##@ Installation
.PHONY: install-dockerregistry-main
install-dockerregistry-main: ## Install dockerregistry with operator using default dockerregistry cr
make -C ${OPERATOR_ROOT} deploy-main apply-default-dockerregistry-cr check-dockerregistry-installation
.PHONY: install-dockerregistry-custom-operator
install-dockerregistry-custom-operator: ## Install dockerregistry with operator from IMG env using default dockerregistry cr
$(call check-var,IMG)
make -C ${OPERATOR_ROOT} deploy apply-default-dockerregistry-cr check-dockerregistry-installation
.PHONY: install-dockerregistry-latest-release
install-dockerregistry-latest-release: ## Install dockerregistry from latest release
kubectl create namespace kyma-system || true
kubectl apply -f https://github.com/kyma-project/docker-registry/releases/latest/download/dockerregistry-operator.yaml
kubectl apply -f https://github.com/kyma-project/docker-registry/releases/latest/download/default-dockerregistry-cr.yaml -n kyma-system
make -C ${OPERATOR_ROOT} check-dockerregistry-installation
.PHONY: remove-dockerregistry
remove-dockerregistry: ## Remove dockerregistry-cr and dockerregistry operator
make -C ${OPERATOR_ROOT} remove-dockerregistry undeploy
.PHONY: run
run: create-k3d install-dockerregistry-main ## Create k3d cluster and install dockerregistry from main
check-var = $(if $(strip $($1)),,$(error "$1" is not defined))
##@ Actions
.PHONY: module-config
module-config:
yq ".channel = \"${CHANNEL}\" | .version = \"${MODULE_VERSION}\""\
module-config-template.yaml > module-config.yaml