From bf4fa82af94615eddb8cad508f0972802b2cea3b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 22 Apr 2025 16:49:51 +0200 Subject: [PATCH] ci: use curl instead of wget in download-git-cache.sh Note that this code is executed on the generic FDo gitlab runners, not in our docker images. This change is merely to avoid the confusion that lead to the code in the previous commit. Part-of: --- .gitlab-ci.yml | 5 ++--- .gitlab-ci/download-git-cache.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43a6c186747..57cfdeead2e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,9 +81,8 @@ variables: MESA_TEMPLATES_COMMIT: &ci-templates-commit ea3f77641d91765396beba192b8defd3085fa343 CI_PRE_CLONE_SCRIPT: |- set -o xtrace - wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh - bash download-git-cache.sh - rm download-git-cache.sh + curl --silent --location --fail --retry-connrefused --retry 3 --retry-delay 10 \ + ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash set +o xtrace S3_JWT_FILE: /s3_jwt S3_JWT_FILE_SCRIPT: |- diff --git a/.gitlab-ci/download-git-cache.sh b/.gitlab-ci/download-git-cache.sh index 27fb7a930c8..a414f764aeb 100644 --- a/.gitlab-ci/download-git-cache.sh +++ b/.gitlab-ci/download-git-cache.sh @@ -16,8 +16,8 @@ fi TMP_DIR=$(mktemp -d) echo "$(date +"%F %T") Downloading archived master..." -if ! /usr/bin/wget \ - -O "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \ +if ! curl --location --fail --retry-connrefused --retry 3 --retry-delay 10 \ + --output "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \ "https://${S3_HOST}/${S3_GITCACHE_BUCKET}/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz"; then echo "Repository cache not available"