File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,22 @@ token-kubeconfig: ## Create a local ~/.kube/config with password (not usually ne
129129
130130# We only check the remote ssh git branch's existance if we're not running inside a container
131131# as getting ssh auth working inside a container seems a bit brittle
132+ # If the main repoUpstreamURL field is set, then we need to check against
133+ # that and not target_repo
132134.PHONY : validate-origin
133135validate-origin : # # verify the git origin is available
134136 @echo " Checking repository:"
135- @echo -n " $( TARGET_REPO) - branch '$( TARGET_BRANCH) ': "
136- @git ls-remote --exit-code --heads $(TARGET_REPO ) $(TARGET_BRANCH ) > /dev/null && \
137- echo " OK" || (echo " NOT FOUND" ; exit 1)
137+ $(eval UPSTREAMURL := $(shell yq -r '.main.git.repoUpstreamURL // (.main.git.repoUpstreamURL = "") ' values-global.yaml) )
138+ @if [ -z " $( UPSTREAMURL) " ]; then\
139+ echo -n " $( TARGET_REPO) - branch '$( TARGET_BRANCH) ': " ; \
140+ git ls-remote --exit-code --heads $(TARGET_REPO ) $(TARGET_BRANCH ) > /dev/null && \
141+ echo " OK" || (echo " NOT FOUND" ; exit 1); \
142+ else\
143+ echo " Upstream URL set to: $( UPSTREAMURL) " ; \
144+ echo -n " $( UPSTREAMURL) - branch '$( TARGET_BRANCH) ': " ; \
145+ git ls-remote --exit-code --heads $(UPSTREAMURL ) $(TARGET_BRANCH ) > /dev/null && \
146+ echo " OK" || (echo " NOT FOUND" ; exit 1); \
147+ fi
138148
139149.PHONY : validate-cluster
140150validate-cluster : # # Do some cluster validations before installing
You can’t perform that action at this time.
0 commit comments