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>
This commit is contained in:
Madhu Rajanna 2022-09-06 10:36:10 +05:30 committed by mergify[bot]
parent 71dbc7dbb4
commit 9d46478794

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