From 9d46478794721f2887904ebe6340ef03c5a8aa45 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 6 Sep 2022 10:36:10 +0530 Subject: [PATCH] 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 --- deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 0dc77f57f..0cc245a7a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -77,7 +77,8 @@ push_helm_charts() { fi 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 helm package "ceph-csi-${PACKAGE}" popd >/dev/null