ci: do not retry on forks to get the upstream kernel and rootfs
This commit introduces multiple changes: 1. Now we check for mainline artifacts only when NOT running on the mainline branch 2. if we run on the fork and get 404-like error, it doesn't retry. Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com> Signed-off-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22386>
This commit is contained in:

committed by
Marge Bot

parent
2dcd6bed6a
commit
135039f526
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
|
||||||
# shellcheck disable=SC2034 # Variables are used in scripts called from here
|
# shellcheck disable=SC2034 # Variables are used in scripts called from here
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
# shellcheck disable=SC2086 # we want word splitting
|
||||||
@@ -11,13 +11,13 @@ export DEBIAN_FRONTEND=noninteractive
|
|||||||
check_minio()
|
check_minio()
|
||||||
{
|
{
|
||||||
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
||||||
if curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s -X HEAD \
|
if curl -L --retry 4 -f --retry-delay 60 -s -X HEAD \
|
||||||
"https://${MINIO_PATH}/done"; then
|
"https://${MINIO_PATH}/done"; then
|
||||||
|
echo "Remote files are up-to-date, skip rebuilding them."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# If remote files are up-to-date, skip rebuilding them
|
|
||||||
check_minio "${FDO_UPSTREAM_REPO}"
|
check_minio "${FDO_UPSTREAM_REPO}"
|
||||||
check_minio "${CI_PROJECT_PATH}"
|
check_minio "${CI_PROJECT_PATH}"
|
||||||
|
|
||||||
|
@@ -1,15 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Try to use the kernel and rootfs built in mainline first, so we're more
|
# If we run in the fork (not from mesa or Marge-bot), reuse mainline kernel and rootfs, if exist.
|
||||||
# likely to hit cache
|
BASE_SYSTEM_HOST_PATH="${BASE_SYSTEM_MAINLINE_HOST_PATH}"
|
||||||
if curl -s -X HEAD -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
if [ "$CI_PROJECT_PATH" != "$FDO_UPSTREAM_REPO" ]; then
|
||||||
"https://${BASE_SYSTEM_MAINLINE_HOST_PATH}/done"; then
|
if ! curl -s -X HEAD -L --retry 4 -f --retry-delay 60 \
|
||||||
BASE_SYSTEM_HOST_PATH="${BASE_SYSTEM_MAINLINE_HOST_PATH}"
|
"https://${BASE_SYSTEM_MAINLINE_HOST_PATH}/done"; then
|
||||||
else
|
echo "Using kernel and rootfs from the fork, cached from mainline is unavailable."
|
||||||
BASE_SYSTEM_HOST_PATH="${BASE_SYSTEM_FORK_HOST_PATH}"
|
BASE_SYSTEM_HOST_PATH="${BASE_SYSTEM_FORK_HOST_PATH}"
|
||||||
|
else
|
||||||
|
echo "Using the cached mainline kernel and rootfs."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf results
|
rm -rf results
|
||||||
|
Reference in New Issue
Block a user