shell: ta-rpm-deploy: Cleanup stale duplicates dir 94/1594/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 16 Sep 2019 22:06:32 +0000 (00:06 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 16 Sep 2019 22:12:32 +0000 (00:12 +0200)
Cleanup duplicates directories if present from previous runs, e.g.
on static Jenkins slaves.

Change-Id: I18512b7e9152de37f3e73cc66bcc06c2657a3138
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
jjb/shell/ta-rpm-deploy.sh

index aa46e7a..bd31a4c 100644 (file)
@@ -27,6 +27,7 @@ results_dir="$WORKSPACE/work/results"
 repo_name=`echo $WORKSPACE | awk -F '/' '{print $4}' | cut -d '-' -f2- | sed 's|\(.*\)-.*|\1|'`
 
 #Creating dirs to move duplicate RPMs/SRPMs to avoid re-upload and copy the changed RPMs/SRPMs
+rm -rf "$results_dir/repo/duplicates" "$results_dir/src_repo/duplicates"
 mkdir "$results_dir/repo/duplicates"
 mkdir "$results_dir/src_repo/duplicates"
 mkdir -p "$arch_dir"