ci: Use versions.yaml for the libseccomp

It would be nice to use `versions.yaml` for the maintainability.
Previously, we have been specified the `libseccomp` and the `gperf` version
directly in this script without using the `versions.yaml` because the current
snap workflow is incomplete and fails.
This is because snap CI environment does not have kata-cotnainers repository
under ${GOPATH}. To avoid the failure, the `rootfs.sh` extracts the libseccomp
version and url in advance and pass them to the `install_libseccomp.sh` as
environment variables.

Fixes: #4941

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
This commit is contained in:
Manabu Sugimoto
2022-08-17 16:32:00 +09:00
parent 6d6edb0bb3
commit 92f7d6bf8f
3 changed files with 37 additions and 14 deletions

View File

@@ -264,6 +264,25 @@ detect_rust_version()
[ -n "$RUST_VERSION" ]
}
detect_libseccomp_info()
{
info "Detecting libseccomp version"
info "Get libseccomp version and url from ${kata_versions_file}"
local libseccomp_ver_yq_path="externals.libseccomp.version"
local libseccomp_url_yq_path="externals.libseccomp.url"
export LIBSECCOMP_VERSION="$(get_package_version_from_kata_yaml "$libseccomp_ver_yq_path")"
export LIBSECCOMP_URL="$(get_package_version_from_kata_yaml "$libseccomp_url_yq_path")"
info "Get gperf version and url from ${kata_versions_file}"
local gperf_ver_yq_path="externals.gperf.version"
local gperf_url_yq_path="externals.gperf.url"
export GPERF_VERSION="$(get_package_version_from_kata_yaml "$gperf_ver_yq_path")"
export GPERF_URL="$(get_package_version_from_kata_yaml "$gperf_url_yq_path")"
[ -n "$LIBSECCOMP_VERSION" ] && [ -n $GPERF_VERSION ] && [ -n "$LIBSECCOMP_URL" ] && [ -n $GPERF_URL ]
}
before_starting_container() {
return 0
}