ci/openshift-ci: Correct the lib location

correct the lib file locations after the move from
tests->kata-containers repo and add a minimized version of the
".ci/lib.sh" library into the "ci/openshift-ci" as we don't really
utilize all of the features.

Fixes: #8653

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
This commit is contained in:
Lukáš Doktor 2023-12-13 13:47:10 +01:00
parent 4c58478536
commit b0b7748f30
No known key found for this signature in database
GPG Key ID: 26B362E47FCF22C1
5 changed files with 25 additions and 5 deletions

View File

@ -14,8 +14,8 @@ set -o nounset
set -o pipefail
script_dir="$(dirname $0)"
webhook_dir="${script_dir}/../../../kata-webhook"
source "${script_dir}/../../lib.sh"
webhook_dir="${script_dir}/../../../tools/testing/kata-webhook"
source "${script_dir}/../lib.sh"
KATA_RUNTIME=${KATA_RUNTIME:-kata-ci}
info "Creates the kata-webhook ConfigMap"

View File

@ -11,7 +11,7 @@ scripts_dir=$(dirname $0)
deployments_dir=${scripts_dir}/deployments
configs_dir=${scripts_dir}/configs
source ${scripts_dir}/../../lib.sh
source ${scripts_dir}/../lib.sh
# Set to 'yes' if you want to configure SELinux to permissive on the cluster
# workers.

20
ci/openshift-ci/lib.sh Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# Copyright (c) 2023 Red Hat
#
# SPDX-License-Identifier: Apache-2.0
#
# Ensure GOPATH set
if command -v go > /dev/null; then
export GOPATH=${GOPATH:-$(go env GOPATH)}
else
# if go isn't installed, set default location for GOPATH
export GOPATH="${GOPATH:-$HOME/go}"
fi
lib_dir=$(dirname "${BASH_SOURCE[0]}")
source "$lib_dir/../../tests/common.bash"
export katacontainers_repo=${katacontainers_repo:="github.com/kata-containers/kata-containers"}
export katacontainers_repo_dir="${GOPATH}/src/${katacontainers_repo}"

View File

@ -8,7 +8,7 @@
#
script_dir=$(dirname $0)
source ${script_dir}/../lib.sh
source ${script_dir}/lib.sh
pod='http-server'

View File

@ -6,7 +6,7 @@
#
script_dir=$(dirname $0)
source ${script_dir}/../lib.sh
source ${script_dir}/lib.sh
suite=$1
if [ -z "$1" ]; then