gha: Only do preventive cleanups for baremetal

This takes a few minutes that could be saved, so let's avoid doing this
on all the platforms, but simply do this when it's needed (the baremetal
use case).

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2024-05-26 21:30:46 +02:00
parent ee2ef0641c
commit dbd0d4a090
No known key found for this signature in database
GPG Key ID: EE926C2BDACC177B

View File

@ -151,7 +151,9 @@ function deploy_kata() {
[ "$platform" = "kcli" ] && \
export KUBECONFIG="$HOME/.kcli/clusters/${CLUSTER_NAME:-kata-k8s}/auth/kubeconfig"
cleanup_kata_deploy || true
if [ "${K8S_TEST_HOST_TYPE}" = "baremetal" ]; then
cleanup_kata_deploy || true
fi
set_default_cluster_namespace
@ -499,7 +501,9 @@ function deploy_nydus_snapshotter() {
git clone -b "${nydus_snapshotter_version}" "${nydus_snapshotter_url}" "${nydus_snapshotter_install_dir}"
pushd "$nydus_snapshotter_install_dir"
cleanup_nydus_snapshotter || true
if [ "${K8S_TEST_HOST_TYPE}" = "baremetal" ]; then
cleanup_nydus_snapshotter || true
fi
if [ "${PULL_TYPE}" == "guest-pull" ]; then
# Enable guest pull feature in nydus snapshotter
yq write -i \