From 32dbc5d2a9e0811d3d3309b01dd7d39519e28cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Tue, 13 May 2025 09:30:25 +0200 Subject: [PATCH] ci.ocp: Use SCRIPT_DIR to allow execution from any folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We used hardcoded "ci/openshift-ci/cluster" location which expects this script to be only executed from the root. Let's use SCRIPT_DIR instead to allow execution from elsewhere eg. by user bisecting a failed CI run. Signed-off-by: Lukáš Doktor --- ci/openshift-ci/peer-pods-azure.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/openshift-ci/peer-pods-azure.sh b/ci/openshift-ci/peer-pods-azure.sh index 3dbad0d618..d86863fb3c 100755 --- a/ci/openshift-ci/peer-pods-azure.sh +++ b/ci/openshift-ci/peer-pods-azure.sh @@ -10,6 +10,8 @@ # resource group in "eastus" region and peers the network. You # have to remove these manually (or use temporary accounts) +SCRIPT_DIR=$(dirname "$0") + ############################### # Disable security to allow e2e ############################### @@ -228,7 +230,7 @@ done; exit 1 ) || { echo "kata-remote runtimeclass not initialized in 60s"; kube ################ # Deploy webhook ################ -pushd ci/openshift-ci/cluster/ +pushd "${SCRIPT_DIR}/cluster/" kubectl create ns default || true kubectl config set-context --current --namespace=default KATA_RUNTIME=kata-remote ./deploy_webhook.sh