From d65163656b7536f5fd04c2d8fe470f954472bd09 Mon Sep 17 00:00:00 2001 From: Jian Wang Date: Mon, 11 Mar 2024 09:54:24 +0100 Subject: [PATCH] Fix build missed charts Signed-off-by: Jian Wang Co-authored-by: Kiefer Chang --- scripts/build | 1 + scripts/build-bundle | 54 ++++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/scripts/build b/scripts/build index 5633c7914..180694d2e 100755 --- a/scripts/build +++ b/scripts/build @@ -27,6 +27,7 @@ echo "Harvester chart version: ${HARVESTER_CHART_VERSION}" echo "Rancher version: ${RANCHER_VERSION}" echo "Rancher monitoring version: ${MONITORING_VERSION}" echo "Rancher logging version: ${LOGGING_VERSION}" +echo "The ARCH is: ${ARCH}" mkdir -p bin diff --git a/scripts/build-bundle b/scripts/build-bundle index a1589d501..261fec203 100755 --- a/scripts/build-bundle +++ b/scripts/build-bundle @@ -105,22 +105,26 @@ patch_rancher_logging_chart ${CHARTS_DIR} ${LOGGING_VERSION} ${PKG_PATCH_LOGGING tar zxvf ${CHARTS_DIR}/rancher-logging-${LOGGING_VERSION}.tgz >/dev/null --warning=no-timestamp # skip addons for now for arm builds -if [ "{ARCH}" == "amd64" ] -then -# Prepare vm-import-controller-chart -helm pull https://github.com/harvester/charts/releases/download/harvester-vm-import-controller-${VM_IMPORT_CONTROLLER_CHART_VERSION}/harvester-vm-import-controller-${VM_IMPORT_CONTROLLER_CHART_VERSION}.tgz -d ${CHARTS_DIR} -# make chart sanity check -tar zxvf ${CHARTS_DIR}/harvester-vm-import-controller-${VM_IMPORT_CONTROLLER_CHART_VERSION}.tgz >/dev/null --warning=no-timestamp - -# Prepare pcidevices-chart -helm pull https://github.com/harvester/charts/releases/download/harvester-pcidevices-controller-${PCIDEVICES_CONTROLLER_CHART_VERSION}/harvester-pcidevices-controller-${PCIDEVICES_CONTROLLER_CHART_VERSION}.tgz -d ${CHARTS_DIR} -# make chart sanity check -tar zxvf ${CHARTS_DIR}/harvester-pcidevices-controller-${PCIDEVICES_CONTROLLER_CHART_VERSION}.tgz >/dev/null --warning=no-timestamp - -# Prepare harvester-seeder-chart -helm pull https://github.com/harvester/charts/releases/download/harvester-seeder-${HARVESTER_SEEDER_CHART_VERSION}/harvester-seeder-${HARVESTER_SEEDER_CHART_VERSION}.tgz -d ${CHARTS_DIR} -# make chart sanity check -tar zxvf ${CHARTS_DIR}/harvester-seeder-${HARVESTER_SEEDER_CHART_VERSION}.tgz >/dev/null --warning=no-timestamp +if [ ${ARCH} == "amd64" ]; then + # Prepare vm-import-controller-chart + echo "pull harvester-vm-import-controller: $VM_IMPORT_CONTROLLER_CHART_VERSION" + helm pull https://github.com/harvester/charts/releases/download/harvester-vm-import-controller-${VM_IMPORT_CONTROLLER_CHART_VERSION}/harvester-vm-import-controller-${VM_IMPORT_CONTROLLER_CHART_VERSION}.tgz -d ${CHARTS_DIR} + # make chart sanity check + tar zxvf ${CHARTS_DIR}/harvester-vm-import-controller-${VM_IMPORT_CONTROLLER_CHART_VERSION}.tgz >/dev/null --warning=no-timestamp + + # Prepare pcidevices-chart + echo "pull harvester-pcidevices-controller: $PCIDEVICES_CONTROLLER_CHART_VERSION" + helm pull https://github.com/harvester/charts/releases/download/harvester-pcidevices-controller-${PCIDEVICES_CONTROLLER_CHART_VERSION}/harvester-pcidevices-controller-${PCIDEVICES_CONTROLLER_CHART_VERSION}.tgz -d ${CHARTS_DIR} + # make chart sanity check + tar zxvf ${CHARTS_DIR}/harvester-pcidevices-controller-${PCIDEVICES_CONTROLLER_CHART_VERSION}.tgz >/dev/null --warning=no-timestamp + + # Prepare harvester-seeder-chart + echo "pull harvester-seeder: $HARVESTER_SEEDER_CHART_VERSION" + helm pull https://github.com/harvester/charts/releases/download/harvester-seeder-${HARVESTER_SEEDER_CHART_VERSION}/harvester-seeder-${HARVESTER_SEEDER_CHART_VERSION}.tgz -d ${CHARTS_DIR} + # make chart sanity check + tar zxvf ${CHARTS_DIR}/harvester-seeder-${HARVESTER_SEEDER_CHART_VERSION}.tgz >/dev/null --warning=no-timestamp +else + echo "no harvester-vm-import-controller, harvester-pcidevices-controller, harvester-seeder charts for arm64" fi # Prepare nvidia-driver-toolkit chart @@ -182,16 +186,16 @@ for i in "${!repositories[@]}"; do done # skip addons for now for arm builds -if [ "{ARCH}" == "amd64" ] -then -# vm-import-controller: get images from values.yaml -echo ${VM_IMPORT_CONTROLLER_IMAGE} >> ${image_list_file} -# pcidevices-controller images -echo ${PCIDEVICES_CONTROLLER_IMAGE} >> ${image_list_file} - -# seeder images -echo ${HARVESTER_SEEDER_IMAGE} >> ${image_list_file} +if [ ${ARCH} == "amd64" ]; then + # vm-import-controller: get images from values.yaml + echo ${VM_IMPORT_CONTROLLER_IMAGE} >> ${image_list_file} + # pcidevices-controller images + echo ${PCIDEVICES_CONTROLLER_IMAGE} >> ${image_list_file} + + # seeder images + echo ${HARVESTER_SEEDER_IMAGE} >> ${image_list_file} fi + # harvester additional images, which is not in rancher images, not in harvester images or any others # do not add any comment line into this file, each line should be an valid image name cat ${SCRIPTS_DIR}/images/harvester-additional-images.txt >> ${image_list_file}