Skip to content

Commit

Permalink
Merge branch 'master' into fixolmresroucenames
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek authored Aug 26, 2024
2 parents 4a2ec1d + 0670d7e commit 841e6a0
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions make/ksctl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ endif

get-ksctl-and-install:
ifeq ($(strip $(KSCTL_REPO_PATH)),)
ifneq ($(DEPLOY_LATEST),true)
ifneq ($(CI),)
ifneq ($(GITHUB_ACTIONS),)
$(eval BRANCH_NAME = ${GITHUB_HEAD_REF})
$(eval AUTHOR_LINK = https://github.com/${AUTHOR})
else
$(eval AUTHOR_LINK = $(shell jq -r '.refs[0].pulls[0].author_link' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'))
@echo "found author link ${AUTHOR_LINK}"
$(eval BRANCH_NAME := $(shell jq -r '.refs[0].pulls[0].head_ref' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'))
endif
ifneq ($(CI_DISABLE_PAIRING),true)
ifeq ($(shell jq -r '.refs[0].org' <<< $${CLONEREFS_OPTIONS} 2>/dev/null || true | tr -d '[:space:]'),codeready-toolchain)
$(eval AUTHOR_LINK = $(shell jq -r '.refs[0].pulls[0].author_link' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'))
$(eval BRANCH_NAME := $(shell jq -r '.refs[0].pulls[0].head_ref' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'))
@echo "using author link ${AUTHOR_LINK}"
@echo "detected branch ${BRANCH_NAME}"
# check if a branch with the same ref exists in the user's fork of ksctl repo
Expand All @@ -35,10 +29,10 @@ ifeq ($(strip $(KSCTL_REPO_PATH)),)
# check if the branch with the same name exists, if so then merge it with master and use the merge branch, if not then use master
@$(MAKE) clone-ksctl-and-pair REMOTE_KSCTL_BRANCH=${REMOTE_KSCTL_BRANCH} AUTHOR_LINK=${AUTHOR_LINK}
else
@echo "Not running in CI - no pairing"
@echo "Either not running in openshift-ci or not in the codeready-toolchain org - no pairing"
endif
else
@echo "DEPLOY_LATEST is set to true - no pairing"
@echo "Pairing explicitly disabled"
endif
else
@echo "KSCTL_REPO_PATH is set to ${KSCTL_REPO_PATH} - no pairing"
Expand Down

0 comments on commit 841e6a0

Please sign in to comment.