mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 22:53:43 +00:00
Merge pull request #5827 from GabyCT/topic/cachevirtofsdccc
CCv0: use virtiofsd cache
This commit is contained in:
commit
7830e94e8c
@ -236,10 +236,11 @@ install_cc_shimv2() {
|
|||||||
|
|
||||||
# Install static CC virtiofsd asset
|
# Install static CC virtiofsd asset
|
||||||
install_cc_virtiofsd() {
|
install_cc_virtiofsd() {
|
||||||
|
local virtiofsd_version="$(get_from_kata_deps "externals.virtiofsd.version")-$(get_from_kata_deps "externals.virtiofsd.toolchain")"
|
||||||
install_cached_component \
|
install_cached_component \
|
||||||
"virtiofsd" \
|
"virtiofsd" \
|
||||||
"${jenkins_url}/job/kata-containers-2.0-virtiofsd-cc-$(uname -m)/${cached_artifacts_path}" \
|
"${jenkins_url}/job/kata-containers-2.0-virtiofsd-cc-$(uname -m)/${cached_artifacts_path}" \
|
||||||
"$(get_from_kata_deps "assets.externals.virtiofsd.version")" \
|
"${virtiofsd_version}" \
|
||||||
"$(get_virtiofsd_image_name)" \
|
"$(get_virtiofsd_image_name)" \
|
||||||
"${final_tarball_name}" \
|
"${final_tarball_name}" \
|
||||||
"${final_tarball_path}" \
|
"${final_tarball_path}" \
|
||||||
|
@ -67,6 +67,13 @@ cache_firmware_artifacts() {
|
|||||||
create_cache_asset "${firmware_tarball_name}" "${current_firmware_version}" "${current_firmware_image}"
|
create_cache_asset "${firmware_tarball_name}" "${current_firmware_version}" "${current_firmware_image}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cache_virtiofsd_artifacts() {
|
||||||
|
local virtiofsd_tarball_name="kata-static-cc-virtiofsd.tar.xz"
|
||||||
|
local current_virtiofsd_version="$(get_from_kata_deps "externals.virtiofsd.version")-$(get_from_kata_deps "externals.virtiofsd.toolchain")"
|
||||||
|
local current_virtiofsd_image="$(get_virtiofsd_image_name)"
|
||||||
|
create_cache_asset "${virtiofsd_tarball_name}" "${current_virtiofsd_version}" "${current_virtiofsd_image}"
|
||||||
|
}
|
||||||
|
|
||||||
create_cache_asset() {
|
create_cache_asset() {
|
||||||
local component_name="${1}"
|
local component_name="${1}"
|
||||||
local component_version="${2}"
|
local component_version="${2}"
|
||||||
@ -101,6 +108,7 @@ Usage: $0 "[options]"
|
|||||||
* Requires FIRMWARE environment variable set, valid values are:
|
* Requires FIRMWARE environment variable set, valid values are:
|
||||||
* tdvf
|
* tdvf
|
||||||
* td-shim
|
* td-shim
|
||||||
|
-v Virtiofsd cache
|
||||||
-h Shows help
|
-h Shows help
|
||||||
EOF
|
EOF
|
||||||
)"
|
)"
|
||||||
@ -111,8 +119,9 @@ main() {
|
|||||||
local qemu_component="${qemu_component:-}"
|
local qemu_component="${qemu_component:-}"
|
||||||
local kernel_component="${kernel_component:-}"
|
local kernel_component="${kernel_component:-}"
|
||||||
local firmware_component="${firmware_component:-}"
|
local firmware_component="${firmware_component:-}"
|
||||||
|
local virtiofsd_component="${virtiofsd_component:-}"
|
||||||
local OPTIND
|
local OPTIND
|
||||||
while getopts ":ckqfh:" opt
|
while getopts ":ckqfvh:" opt
|
||||||
do
|
do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
c)
|
c)
|
||||||
@ -127,6 +136,9 @@ main() {
|
|||||||
f)
|
f)
|
||||||
firmware_component="1"
|
firmware_component="1"
|
||||||
;;
|
;;
|
||||||
|
v)
|
||||||
|
virtiofsd_component="1"
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
help
|
help
|
||||||
exit 0;
|
exit 0;
|
||||||
@ -144,6 +156,7 @@ main() {
|
|||||||
[[ -z "${kernel_component}" ]] && \
|
[[ -z "${kernel_component}" ]] && \
|
||||||
[[ -z "${qemu_component}" ]] && \
|
[[ -z "${qemu_component}" ]] && \
|
||||||
[[ -z "${firmware_component}" ]] && \
|
[[ -z "${firmware_component}" ]] && \
|
||||||
|
[[ -z "${virtiofsd_component}" ]] && \
|
||||||
help && die "Must choose at least one option"
|
help && die "Must choose at least one option"
|
||||||
|
|
||||||
mkdir -p "${WORKSPACE}/artifacts"
|
mkdir -p "${WORKSPACE}/artifacts"
|
||||||
@ -154,6 +167,7 @@ main() {
|
|||||||
[ "${kernel_component}" == "1" ] && cache_kernel_artifacts
|
[ "${kernel_component}" == "1" ] && cache_kernel_artifacts
|
||||||
[ "${qemu_component}" == "1" ] && cache_qemu_artifacts
|
[ "${qemu_component}" == "1" ] && cache_qemu_artifacts
|
||||||
[ "${firmware_component}" == "1" ] && cache_firmware_artifacts
|
[ "${firmware_component}" == "1" ] && cache_firmware_artifacts
|
||||||
|
[ "${virtiofsd_component}" == "1" ] && cache_virtiofsd_artifacts
|
||||||
|
|
||||||
ls -la "${WORKSPACE}/artifacts/"
|
ls -la "${WORKSPACE}/artifacts/"
|
||||||
popd
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user