Skip to content

Commit 20c1b6a

Browse files
authored
Merge pull request #645 from mbaldessari/rename_var
Rename NAME to PATTERN_NAME
2 parents 7e92e29 + 8070bfb commit 20c1b6a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
NAME ?= $(shell yq .global.pattern values-global.yaml)
1+
PATTERN_NAME ?= $(shell yq .global.pattern values-global.yaml)
22

3-
ifeq ($(NAME),)
3+
ifeq ($(PATTERN_NAME),)
44
$(error Pattern name MUST be set in values-global.yaml with the value .global.pattern)
55
endif
6-
ifeq ($(NAME),null)
6+
ifeq ($(PATTERN_NAME),null)
77
$(error Pattern name MUST be set in values-global.yaml with the value .global.pattern)
88
endif
99

@@ -83,14 +83,14 @@ PATTERN_INSTALL_CHART ?= oci://quay.io/hybridcloudpatterns/pattern-install
8383

8484
.PHONY: help
8585
help: ## This help message
86-
@echo "Pattern: $(NAME)"
86+
@echo "Pattern: $(PATTERN_NAME)"
8787
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^(\s|[a-zA-Z_0-9-])+:.*?##/ { printf " \033[36m%-35s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
8888

8989
# Makefiles in the individual patterns should call these targets explicitly
9090
# e.g. from industrial-edge: make -f common/Makefile show
9191
.PHONY: show
9292
show: ## show the starting template without installing it
93-
helm template $(PATTERN_INSTALL_CHART) --name-template $(NAME) $(HELM_OPTS)
93+
helm template $(PATTERN_INSTALL_CHART) --name-template $(PATTERN_NAME) $(HELM_OPTS)
9494

9595
preview-all: ## (EXPERIMENTAL) Previews all applications on hub and managed clusters
9696
@echo "NOTE: This is just a tentative approximation of rendering all hub and managed clusters templates"
@@ -102,21 +102,21 @@ preview-%:
102102

103103
.PHONY: operator-deploy
104104
operator-deploy operator-upgrade: validate-prereq $(VALIDATE_ORIGIN) validate-cluster ## runs helm install
105-
@common/scripts/deploy-pattern.sh $(NAME) $(PATTERN_INSTALL_CHART) $(HELM_OPTS)
105+
@common/scripts/deploy-pattern.sh $(PATTERN_NAME) $(PATTERN_INSTALL_CHART) $(HELM_OPTS)
106106

107107
.PHONY: uninstall
108108
uninstall: ## runs helm uninstall
109109
$(eval CSV := $(shell oc get subscriptions -n openshift-operators openshift-gitops-operator -ojsonpath={.status.currentCSV}))
110-
helm uninstall $(NAME)
110+
helm uninstall $(PATTERN_NAME)
111111
@oc delete csv -n openshift-operators $(CSV)
112112

113113
.PHONY: load-secrets
114114
load-secrets: ## loads the secrets into the backend determined by values-global setting
115-
common/scripts/process-secrets.sh $(NAME)
115+
common/scripts/process-secrets.sh $(PATTERN_NAME)
116116

117117
.PHONY: legacy-load-secrets
118118
legacy-load-secrets: ## loads the secrets into vault (only)
119-
common/scripts/vault-utils.sh push_secrets $(NAME)
119+
common/scripts/vault-utils.sh push_secrets $(PATTERN_NAME)
120120

121121
.PHONY: secrets-backend-vault
122122
secrets-backend-vault: ## Edits values files to use default Vault+ESO secrets config

scripts/pattern-util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ podman run -it --rm --pull=newer \
8989
-e TARGET_ORIGIN \
9090
-e TARGET_SITE \
9191
-e TARGET_BRANCH \
92-
-e NAME \
92+
-e PATTERN_NAME \
9393
-e TOKEN_SECRET \
9494
-e TOKEN_NAMESPACE \
9595
-e VALUES_SECRET \

0 commit comments

Comments
 (0)