ci: use resync to sync helm charts

When a file on source is deleted same
need to be deleted on the destination,
with rsync we can achieve it.

fixes: #3329

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 9d46478794)
This commit is contained in:
Madhu Rajanna 2022-09-06 10:36:10 +05:30 committed by mergify[bot]
parent 04879bbb33
commit 468c73d2b6

View File

@ -77,7 +77,8 @@ push_helm_charts() {
fi fi
mkdir -p "${CHARTDIR}/csi-charts/docs/${PACKAGE}" mkdir -p "${CHARTDIR}/csi-charts/docs/${PACKAGE}"
cp -R "./charts/ceph-csi-${PACKAGE}" "${CHARTDIR}/csi-charts/docs/${PACKAGE}" # Use rsync to remove files from destination when source file is deleted.
rsync -avh "./charts/ceph-csi-${PACKAGE}" "${CHARTDIR}/csi-charts/docs/${PACKAGE}" --delete
pushd "${CHARTDIR}/csi-charts/docs/${PACKAGE}" >/dev/null pushd "${CHARTDIR}/csi-charts/docs/${PACKAGE}" >/dev/null
helm package "ceph-csi-${PACKAGE}" helm package "ceph-csi-${PACKAGE}"
popd >/dev/null popd >/dev/null