Merge pull request #9932 from BbolroC/drop-ci-install-go

CI: Eliminate dependency on tests repo
This commit is contained in:
Hyounggyu Choi
2024-07-01 08:24:28 +02:00
committed by GitHub
15 changed files with 53 additions and 197 deletions

View File

@@ -28,6 +28,8 @@ KATA_HYPERVISOR="${KATA_HYPERVISOR:-qemu}"
RUNTIME="${RUNTIME:-containerd-shim-kata-v2}"
export branch="${target_branch:-main}"
function die() {
local msg="$*"
@@ -792,3 +794,48 @@ function load_vhost_mods() {
sudo modprobe vhost_net
sudo modprobe vhost_vsock
}
function run_static_checks()
{
# Make sure we have the targeting branch
git remote set-branches --add origin "${branch}"
git fetch -a
bash "$this_script_dir/static-checks.sh" "$@"
}
function run_docs_url_alive_check()
{
# Make sure we have the targeting branch
git remote set-branches --add origin "${branch}"
git fetch -a
bash "$this_script_dir/static-checks.sh" --docs --all "github.com/kata-containers/kata-containers"
}
function run_get_pr_changed_file_details()
{
# Make sure we have the targeting branch
git remote set-branches --add origin "${branch}"
git fetch -a
get_pr_changed_file_details
}
# Check if the 1st argument version is greater than and equal to 2nd one
# Version format: [0-9]+ separated by period (e.g. 2.4.6, 1.11.3 and etc.)
#
# Parameters:
# $1 - a version to be tested
# $2 - a target version
#
# Return:
# 0 if $1 is greater than and equal to $2
# 1 otherwise
function version_greater_than_equal() {
local current_version=$1
local target_version=$2
smaller_version=$(echo -e "$current_version\n$target_version" | sort -V | head -1)
if [ "${smaller_version}" = "${target_version}" ]; then
return 0
else
return 1
fi
}

View File

@@ -26,19 +26,8 @@ test_category="[kata][vfio-ap][containerd]"
trap cleanup EXIT
# Check if the given function exists.
function_exists() {
[[ "$(type -t $1)" == "function" ]]
}
if ! function_exists get_test_version; then
source "${script_path}/../../.ci/lib.sh"
fi
# Prevent the program from exiting on error
trap - ERR
image_version=$(get_test_version "docker_images.registry_ibm.version")
registry_image=$(get_test_version "docker_images.registry_ibm.registry_url"):"${image_version}"
setup_config_file() {
local target_item=$1

View File

@@ -11,7 +11,7 @@ kubernetes_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck disable=1091
source "${kubernetes_dir}/../../gha-run-k8s-common.sh"
# shellcheck disable=1091
source "${kubernetes_dir}/../../../ci/lib.sh"
source "${kubernetes_dir}/../../../tests/common.bash"
KATA_HYPERVISOR="${KATA_HYPERVISOR:-qemu}"
# Where the trustee (includes kbs) sources will be cloned