From 263030a4071bcdeaca085dde57ca821bc6690092 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 18 Sep 2019 12:35:05 +0200 Subject: [PATCH] shell: ta-rpm-deploy: curl should follow redirects Currently, `curl` exits with a 0 status code for HTTP/301, which is the case for both existent and non-existent artifacts in nexus3, breaking the logic behind duplicate artifact checking. This should fix uploading aarch64 artifacts, which are currently wrongly detected as duplicates due to the above quirk. Change-Id: I6b3164476b4fcb95115934eda72d53edf102858b Signed-off-by: Alexandru Avadanii --- jjb/shell/ta-rpm-deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jjb/shell/ta-rpm-deploy.sh b/jjb/shell/ta-rpm-deploy.sh index da977c7..f0381e8 100644 --- a/jjb/shell/ta-rpm-deploy.sh +++ b/jjb/shell/ta-rpm-deploy.sh @@ -37,7 +37,7 @@ mkdir -p "$sources_dir" for artifact in \ `ls $results_dir/repo/*.rpm` do - if curl --head --fail $nexus_repo_url/$release_path/rpms/$(uname -m)/$(basename $artifact) + if curl -L --head --fail $nexus_repo_url/$release_path/rpms/$(uname -m)/$(basename $artifact) then echo "RPM - $(basename $artifact) already available in Nexus" mv $results_dir/repo/$(basename $artifact) $results_dir/repo/duplicates/ @@ -51,7 +51,7 @@ for artifact in \ for artifact in \ `ls $results_dir/src_repo/*.rpm` do - if curl --head --fail $nexus_repo_url/$release_path/rpms/Sources/$(basename $artifact) + if curl -L --head --fail $nexus_repo_url/$release_path/rpms/Sources/$(basename $artifact) then echo "Source RPM - $(basename $artifact) already available in Nexus" mv $results_dir/src_repo/$(basename $artifact) $results_dir/src_repo/duplicates/ -- 2.16.6