Skip to content

Commit e40e6ae

Browse files
committed
Introduce DISABLE_VALIDATE_ORIGIN variable
With this one can disable the origin validation entirely. This can come in handy when setting things up for testing the existance of the remote branch is too onerous (i.e. private git repo) Now you can run: export DISABLE_VALIDATE_ORIGIN=true ./pattern.sh make install and the check will be skipped
1 parent 7d184fb commit e40e6ae

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ ifneq ($(origin TARGET_SITE), undefined)
44
TARGET_SITE_OPT=--set main.clusterGroupName=$(TARGET_SITE)
55
endif
66

7+
# Set this to true if you want to skip any origin validation
8+
DISABLE_VALIDATE_ORIGIN ?= false
9+
ifeq ($(DISABLE_VALIDATE_ORIGIN),true)
10+
VALIDATE_ORIGIN :=
11+
else
12+
VALIDATE_ORIGIN := validate-origin
13+
endif
14+
715
# This variable can be set in order to pass additional helm arguments from the
816
# the command line. I.e. we can set things without having to tweak values files
917
EXTRA_HELM_OPTS ?=
@@ -71,7 +79,7 @@ preview-%:
7179
@common/scripts/preview.sh $(CLUSTERGROUP) $* $(TARGET_REPO) $(TARGET_BRANCH)
7280

7381
.PHONY: operator-deploy
74-
operator-deploy operator-upgrade: validate-prereq validate-origin validate-cluster ## runs helm install
82+
operator-deploy operator-upgrade: validate-prereq $(VALIDATE_ORIGIN) validate-cluster ## runs helm install
7583
@common/scripts/deploy-pattern.sh $(NAME) $(PATTERN_INSTALL_CHART) $(HELM_OPTS)
7684

7785
.PHONY: uninstall

scripts/pattern-util.sh

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ podman run -it --rm --pull=newer \
9696
-e KUBECONFIG \
9797
-e PATTERN_INSTALL_CHART \
9898
-e PATTERN_DISCONNECTED_HOME \
99+
-e DISABLE_VALIDATE_ORIGIN \
99100
-e K8S_AUTH_HOST \
100101
-e K8S_AUTH_VERIFY_SSL \
101102
-e K8S_AUTH_SSL_CA_CERT \

0 commit comments

Comments
 (0)