ci: migrate from wget to curl
Better error handling is more reliable. Options: -L, follow location --retry, number of retries --retry-all-errors, does not fail on ALL errors, that's why there is -f -f, fail fast with no output at all on server errors --retry-delay, make curl sleep this amount of time before each retry Signed-off-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
This commit is contained in:

committed by
Marge Bot

parent
1abd3a3051
commit
796686af1b
@@ -16,10 +16,11 @@ fi
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
echo "Downloading archived master..."
|
||||
/usr/bin/wget -O $TMP_DIR/$CI_PROJECT_NAME.tar.gz \
|
||||
https://${MINIO_HOST}/git-cache/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz
|
||||
curl --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
-o "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
|
||||
"https://${MINIO_HOST}/git-cache/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz"
|
||||
|
||||
# check wget error code
|
||||
# check curl error code
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
echo "Repository cache not available"
|
||||
|
Reference in New Issue
Block a user