ci: only clean the artifacts folder if gitlab hasn't already done it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35740>
This commit is contained in:
Eric Engestrom 2025-06-27 19:00:12 +02:00 committed by Marge Bot
parent 76c9b277e4
commit 047bb6b85a
3 changed files with 8 additions and 4 deletions

View file

@ -135,7 +135,9 @@ replay_s3_upload_images() {
SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
if [ "$GIT_STRATEGY" = none ]; then
cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
fi
cd /piglit
if [ -n "$USE_CASELIST" ]; then

View file

@ -130,7 +130,9 @@ export -f _error_msg
if [ -z "${RESULTS_DIR:-}" ]; then
export RESULTS_DIR="${PWD%/}/results"
rm -rf "${RESULTS_DIR}"
if [ "$GIT_STRATEGY" = none ]; then
rm -rf "${RESULTS_DIR}"
fi
fi
mkdir -p "${RESULTS_DIR}"

View file

@ -149,7 +149,7 @@
.deqp-test:
script:
- rm -rf results # Clear out old results if the docker container was cached
- if [ "$GIT_STRATEGY" = none ]; then rm -rf results; fi # Clear out old results if the docker container was cached
- ./install/deqp-runner.sh
artifacts:
exclude:
@ -175,6 +175,6 @@
# setup).
- section_start artifacts_download "Downloading artifacts from s3"
# Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
- rm -rf install
- if [ "$GIT_STRATEGY" = none ]; then rm -rf install; fi
- (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x)
- section_end artifacts_download