tests/integration: Perform yq install in run_tests()

We only need to install in run_tests() so that the yq install is picked up by
kubernets/setup.sh as well. We also need to either use (sudo &&
INSTALL_IN_GOPATH=false) || (INSTALL_IN_GOPATH=true).

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2023-07-03 16:43:55 +02:00
parent 1c211cd730
commit 40c46c75ed
2 changed files with 8 additions and 3 deletions

View File

@ -56,10 +56,16 @@ function get_cluster_credentials() {
-n "$(_print_cluster_name)"
}
function run_tests() {
INSTALL_IN_GOPATH=false bash "${repo_root_dir}/ci/install_yq.sh"
function ensure_yq() {
: "${GOPATH:=${GITHUB_WORKSPACE}}"
export GOPATH
export PATH="${GOPATH}/bin:${PATH}"
INSTALL_IN_GOPATH=true "${repo_root_dir}/ci/install_yq.sh"
}
function run_tests() {
platform="${1}"
ensure_yq
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}|g" "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[+].name' "HOST_OS"

View File

@ -29,7 +29,6 @@ set_initrd_path() {
}
main() {
INSTALL_IN_GOPATH=false bash "${repo_root_dir}/ci/install_yq.sh"
set_runtime_class
set_kernel_path
set_initrd_path