gitlab-ci: Don't rebuild kernels and rootfs if they have been already built in mainline

Use the ones from mainline if possible to save cycles rebuilding the same files.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5822>
This commit is contained in:
Tomeu Vizoso
2020-07-09 16:14:14 +02:00
committed by Marge Bot
parent 1a3eb43d5b
commit 9418c8ec8d
2 changed files with 18 additions and 6 deletions

View File

@@ -3,12 +3,17 @@
set -e
set -o xtrace
check_minio()
{
MINIO_PATH="minio-packet.freedesktop.org/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
exit
fi
}
# If remote files are up-to-date, skip rebuilding them
MINIO_PATH=minio-packet.freedesktop.org/mesa-lava/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}
DONE_FILE=https://${MINIO_PATH}/done
if wget -q --method=HEAD ${DONE_FILE}; then
exit
fi
check_minio "mesa/mesa"
check_minio "${CI_PROJECT_PATH}"
. .gitlab-ci/container/container_pre_build.sh