ci.ocp: Use SCRIPT_DIR to allow execution from any folder

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 <ldoktor@redhat.com>
This commit is contained in:
Lukáš Doktor 2025-05-13 09:30:25 +02:00
parent 0e4fb62bb4
commit 32dbc5d2a9
No known key found for this signature in database
GPG Key ID: 26B362E47FCF22C1

View File

@ -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