From 047bb6b85a11b6bb9c3c06f577cdd95e6c01a226 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 27 Jun 2025 19:00:12 +0200 Subject: [PATCH] ci: only clean the artifacts folder if gitlab hasn't already done it Part-of: --- .gitlab-ci/piglit/piglit-traces.sh | 4 +++- .gitlab-ci/setup-test-env.sh | 4 +++- .gitlab-ci/test/gitlab-ci-inc.yml | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/piglit/piglit-traces.sh b/.gitlab-ci/piglit/piglit-traces.sh index bdaaaddc402..771e02b21d0 100755 --- a/.gitlab-ci/piglit/piglit-traces.sh +++ b/.gitlab-ci/piglit/piglit-traces.sh @@ -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 diff --git a/.gitlab-ci/setup-test-env.sh b/.gitlab-ci/setup-test-env.sh index b8caef839c1..98a97673e3f 100755 --- a/.gitlab-ci/setup-test-env.sh +++ b/.gitlab-ci/setup-test-env.sh @@ -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}" diff --git a/.gitlab-ci/test/gitlab-ci-inc.yml b/.gitlab-ci/test/gitlab-ci-inc.yml index 1bf97046b75..c6656750741 100644 --- a/.gitlab-ci/test/gitlab-ci-inc.yml +++ b/.gitlab-ci/test/gitlab-ci-inc.yml @@ -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