From 94809d5d9b71fd3217e5587282563681f8233723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 24 Jun 2026 13:46:57 +0100 Subject: [PATCH] gitlab: greatly expand captured info about CI runner environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To aid in debugging wierd CI failures we need greater information about the CI runner environment. It is usually container based and can have some unexpected characteristics that significantly differ from a developer's local environment. This captures the mount list, CPU model, memory information, device node lists, kernel info, user identity and all environment variables. Since this information can get quite large it is not emitted directly in the logs, rather it is exposed in job artifacts under the "ci-runner-env" directory. Signed-off-by: Daniel P. Berrangé Reviewed-by: Pierrick Bouvier Link: https://lore.kernel.org/qemu-devel/20260624124657.2725376-7-berrange@redhat.com Signed-off-by: Pierrick Bouvier --- .gitlab-ci.d/base.yml | 11 ++++++++++- .gitlab-ci.d/buildtest-template.yml | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index fa0ca94048..8fe0080935 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/base.yml @@ -146,6 +146,7 @@ variables: expire_in: 7 days paths: - build/meson-logs + - ci-runner-env reports: junit: build/meson-logs/*.junit.xml before_script: @@ -155,7 +156,15 @@ variables: # Prevent logs (if any) from prior build job artifacts # from being duplicated in the new job artifacts - rm -f build/meson-logs/* - - test -f /packages.txt && cat /packages.txt + - mkdir -p ci-runner-env + - test -f /packages.txt && cp /packages.txt ci-runner-env/packages.txt + - cp /proc/mounts ci-runner-env/mounts.txt + - cp /proc/cpuinfo ci-runner-env/cpuinfo.txt + - cp /proc/meminfo ci-runner-env/meminfo.txt + - ls -l /dev > ci-runner-env/devices.txt + - uname -a > ci-runner-env/kernel.txt + - id -a > ci-runner-env/user.txt + - printenv | sort > ci-runner-env/environ.txt - section_end setup .base_meson_ccache_job_template: diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index 11d7a75667..e62b3f2123 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -38,6 +38,7 @@ paths: - build - .git-submodule-status + - ci-runner-env exclude: - build/**/*.p - build/**/*.a.p @@ -83,6 +84,7 @@ paths: - build/meson-logs - build/tests/functional/*/*/*.log + - ci-runner-env reports: junit: build/meson-logs/*.junit.xml after_script: