From 4391e039478102f85d38d37e6a5beee254f579c1 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 20 Sep 2024 10:34:02 +0200 Subject: [PATCH] delete published rpms from the cache --- puppet/modules/web/templates/deploy-stagingrpm.sh.epp | 2 ++ puppet/modules/web/templates/deploy-stagingyum.sh.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/puppet/modules/web/templates/deploy-stagingrpm.sh.epp b/puppet/modules/web/templates/deploy-stagingrpm.sh.epp index 4e854f64c..7ea971065 100644 --- a/puppet/modules/web/templates/deploy-stagingrpm.sh.epp +++ b/puppet/modules/web/templates/deploy-stagingrpm.sh.epp @@ -13,3 +13,5 @@ # Publish the repo - stderr/out redirect is required to stop the noninteractive shell from hanging rsync --recursive --times --verbose --one-file-system --delete-after <%= $home %>/rsync_cache/$PROJECT/$RELEASE <%= $rpm_staging_directory %>/$PROJECT/ 2>&1 >/dev/null ; + # Cleanup - no need to keep the rpms + find <%= $home %>/rsync_cache/$PROJECT/$RELEASE -iname '*.rpm' -delete || true diff --git a/puppet/modules/web/templates/deploy-stagingyum.sh.erb b/puppet/modules/web/templates/deploy-stagingyum.sh.erb index 9fd6ebe80..cdf064795 100644 --- a/puppet/modules/web/templates/deploy-stagingyum.sh.erb +++ b/puppet/modules/web/templates/deploy-stagingyum.sh.erb @@ -9,3 +9,5 @@ # Publish the repo - stderr/out redirect is required to stop the noninteractive shell from hanging rsync --recursive --times --verbose --one-file-system --delete-after <%= @home %>/rsync_cache/$PROJECT/$RELEASE <%= @yum_directory %>/$PROJECT/ 2>&1 >/dev/null ; + # Cleanup - no need to keep the rpms + find <%= @home %>/rsync_cache/$PROJECT/$RELEASE -iname '*.rpm' -delete || true