From b3904a1a308e4eb7116f684552d1c8e06966f280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 16 Aug 2023 09:08:18 +0200 Subject: [PATCH] gha: nydus: Populate install_dependencies() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's have all the dependencies needed for running the nydus tests installed. Signed-off-by: Fabiano FidĂȘncio --- tests/integration/nydus/gha-run.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/tests/integration/nydus/gha-run.sh b/tests/integration/nydus/gha-run.sh index a5f856a296..966b69ce93 100755 --- a/tests/integration/nydus/gha-run.sh +++ b/tests/integration/nydus/gha-run.sh @@ -16,7 +16,34 @@ source "${nydus_dir}/../../common.bash" function install_dependencies() { info "Installing the dependencies needed for running the nydus tests" - return 0 + # Dependency list of projects that we can rely on the system packages + # - jq + declare -a system_deps=( + jq + ) + + sudo apt-get update + sudo apt-get -y install "${system_deps[@]}" + + ensure_yq + + # Dependency list of projects that we can install them + # directly from their releases on GitHub: + # - containerd + # - cri-container-cni release tarball already includes CNI plugins + # - cri-tools + # - nydus + # - nydus-snapshotter + declare -a github_deps + github_deps[0]="cri_containerd:$(get_from_kata_deps "externals.containerd.${CONTAINERD_VERSION}")" + github_deps[1]="cri_tools:$(get_from_kata_deps "externals.critools.latest")" + github_deps[2]="nydus:$(get_from_kata_deps "externals.nydus.version")" + github_deps[3]="nydus_snapshotter:$(get_from_kata_deps "externals.nydus-snapshotter.version")" + + for github_dep in "${github_deps[@]}"; do + IFS=":" read -r -a dep <<< "${github_dep}" + install_${dep[0]} "${dep[1]}" + done } function run() {