Skip to content

Commit

Permalink
Fix build missed charts
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Wang <[email protected]>

Co-authored-by: Kiefer Chang <[email protected]>
  • Loading branch information
w13915984028 and bk201 committed Mar 11, 2024
1 parent 71bf39b commit d219deb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 25 deletions.
2 changes: 2 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ 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

Expand Down
54 changes: 29 additions & 25 deletions scripts/build-bundle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit d219deb

Please sign in to comment.