]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
gitlab: prevent duplicated meson log artifacts in test jobs
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 8 Sep 2025 19:09:01 +0000 (20:09 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 9 Sep 2025 09:29:42 +0000 (11:29 +0200)
The build jobs will populate build/meson-logs/ with various files
that are added as artifacts.

The test jobs preserve the state of the build jobs, so we must
delete any pre-existing logs to prevent confusion from duplicate
artifacts.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250908190901.3571859-5-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
.gitlab-ci.d/buildtest-template.yml

index 308490a35acdb7ea6d57ce5bcd2bacc01df5a3d5..d866cb12bb1ee1595322d0d4c73945b78dc649c8 100644 (file)
 
 .native_test_job_template:
   extends: .common_test_job_template
+  before_script:
+    # Prevent logs from the build job that run earlier
+    # from being duplicated in the test job artifacts
+    - rm -f build/meson-logs/*
   artifacts:
     name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
     when: always
   before_script:
     - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1
     - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache
+    # Prevent logs from the build job that run earlier
+    # from being duplicated in the test job artifacts
+    - rm -f build/meson-logs/*
   after_script:
     - cd build
     - du -chs ${CI_PROJECT_DIR}/*-cache