summaryrefslogtreecommitdiff
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2022-03-11 11:50:29 +0100
committerCorentin Noël <corentin.noel@collabora.com>2022-03-11 12:15:47 +0100
commit91bbda419504fe628fee6e8bd42e26f80abd9e32 (patch)
treec9c65843f9fce88de5b4452e0dbc0348125bdfce /.gitlab-ci
parent6f296ee4bfb2de48ac2b3babdec58cef068ffe30 (diff)
ci: Fallback to download artifacts from GitLab
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/739>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x.gitlab-ci/container/debian/x86_test.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/.gitlab-ci/container/debian/x86_test.sh b/.gitlab-ci/container/debian/x86_test.sh
index aef221a..6e21a04 100755
--- a/.gitlab-ci/container/debian/x86_test.sh
+++ b/.gitlab-ci/container/debian/x86_test.sh
@@ -34,9 +34,18 @@ mkdir -p ${MESA_CI_PROJECT_DIR}
cd ${MESA_CI_PROJECT_DIR}
# Deploy Mesa CI artifacts
-wget -S --progress=dot:giga -O- \
- https://${MINIO_HOST}/artifacts/${MESA_PROJECT_PATH}/${MESA_PIPELINE_ID}/mesa-amd64.tar.gz \
-| tar -xvz
+MESA_CI_ARTIFACTS_URL="https://${MINIO_HOST}/artifacts/${MESA_PROJECT_PATH}/${MESA_PIPELINE_ID}/mesa-amd64.tar.gz"
+if [ wget -q --method=HEAD ${MESA_CI_ARTIFACTS_URL} ]; then
+ wget -S --progress=dot:giga -O- ${MESA_CI_ARTIFACTS_URL} | tar -xvz
+else
+ echo -e "\e[31mThe Mesa artifacts has expired, please update to newer Mesa pipeline!\e[0m"
+ apt-get update && apt-get -y install jq
+ MESA_JOB_ID=$(wget -cq "${CI_API_V4_URL}/projects/176/pipelines/${MESA_PIPELINE_ID}/jobs?per_page=100&scope=success" -O - \
+ | jq -c '.[] | select(.name == "debian-testing") | .id')
+ MESA_CI_ARTIFACTS_URL="${CI_API_V4_URL}/projects/176/jobs/${MESA_JOB_ID}/artifacts/artifacts/install.tar"
+ unset MESA_JOB_ID
+ wget -S --progress=dot:giga -O- ${MESA_CI_ARTIFACTS_URL} | tar -xv
+fi
# Overwrite Mesa CI's virglrenderer binaries with self built versions
cp -a ${CI_PROJECT_DIR}/install/bin/virgl_test_server /usr/local/bin/