From a95d45fb50595ff8a8af419568325a96a6f41543 Mon Sep 17 00:00:00 2001 From: "panyintian.fu" Date: Thu, 21 Nov 2024 08:49:29 +0800 Subject: [PATCH] [Test]Optimize the generation method of rocky-kubeanclusterops Signed-off-by: panyintian.fu --- hack/offline_run_centos.sh | 4 +++- hack/run-network-e2e.sh | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hack/offline_run_centos.sh b/hack/offline_run_centos.sh index 65c0aa139..83af90880 100644 --- a/hack/offline_run_centos.sh +++ b/hack/offline_run_centos.sh @@ -15,7 +15,9 @@ export OS_NAME="ROCKY8" CLUSTER_OPERATION_NAME1="cluster1-install-"`date "+%H-%M-%S"` cp -f ${REPO_ROOT}/test/offline-common/hosts-conf-cm.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/ cp -f ${REPO_ROOT}/test/offline-common/kubeanCluster.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/ -cp -f ${REPO_ROOT}/test/offline-common/kubeanClusterOps-rocky.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/kubeanClusterOps.yml +cp -f ${REPO_ROOT}/test/offline-common/kubeanClusterOps.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/kubeanClusterOps.yml +minio_url=" -e \"{repo_list: ['{offline_minio_url}/kubean/rocky/\\\\\$releasever/os/\\\\\$basearch','{offline_minio_url}/kubean/rocky-iso/\\\\\$releasever/os/\\\\\$basearch/BaseOS','{offline_minio_url}/kubean/rocky-iso/\\\\\$releasever/os/\\\\\$basearch/AppStream']}\"" +sed -i "s|.*repo_list.*|${minio_url}|" ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/kubeanClusterOps.yml cp -f ${REPO_ROOT}/test/offline-common/vars-conf-cm.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/ util::vm_name_ip_init_offline_by_os ${OS_NAME} diff --git a/hack/run-network-e2e.sh b/hack/run-network-e2e.sh index a24c3ed87..d5dd5760b 100644 --- a/hack/run-network-e2e.sh +++ b/hack/run-network-e2e.sh @@ -39,10 +39,10 @@ function func_prepare_config_yaml_single_stack() { cp -f "${source_path}"/hosts-conf-cm-2nodes.yml "${dest_path}"/hosts-conf-cm.yml cp -f "${source_path}"/vars-conf-cm.yml "${dest_path}" cp -f "${source_path}"/kubeanCluster.yml "${dest_path}" + cp -f "${source_path}"/kubeanClusterOps.yml "${dest_path}" if [[ "${os_name}" = "ROCKY8" ]]; then - cp -f "${source_path}"/kubeanClusterOps-rocky.yml "${dest_path}" - else - cp -f "${source_path}"/kubeanClusterOps.yml "${dest_path}" + minio_url=" -e \"{repo_list: ['{offline_minio_url}/kubean/rocky/\\\\\$releasever/os/\\\\\$basearch','{offline_minio_url}/kubean/rocky-iso/\\\\\$releasever/os/\\\\\$basearch/BaseOS','{offline_minio_url}/kubean/rocky-iso/\\\\\$releasever/os/\\\\\$basearch/AppStream']}\"" + sed -i "s|.*repo_list.*|${minio_url}|" "${dest_path}"/kubeanClusterOps.yml fi cp -f "${source_path}"/kubeanClusterOps.yml "${dest_path}"