ci: retain EL10 Mock failure logs

Why:
An EL10 package failure must be diagnosable from its workflow evidence.

Impact:
Failed daily-stable Mock builds now expose their direct and result-directory
logs to the existing failure-evidence upload action.

Before/After:
The workflow reported only Mock's final failed command; detailed rpmbuild
output remained inaccessible in the runner temporary directory.

Technical Overview:
Normalize ownership of the Mock result and aggregate build-log paths before
checking the build result.
On failure, write the primary log and every Mock result log to
failed-tests.log, which is already collected by upload-flake-evidence.
Keep the successful artifact path unchanged.

With the help of AI-Agents: Codex
This commit is contained in:
Rainer Gerhards 2026-08-04 10:06:19 +02:00
parent 541a7602d8
commit 3a3cfda6a5

View File

@ -225,10 +225,17 @@ jobs:
set -e
devtools/ci-flake-phase.sh end \
el10-package-build custom "$build_status"
sudo chown -R "$(id -u):$(id -g)" \
"$RUNNER_TEMP/el10-artifacts" "$RUNNER_TEMP/el10-build.log" || true
if [ "$build_status" -eq 0 ]; then
sudo chown -R "$(id -u):$(id -g)" \
"$RUNNER_TEMP/el10-artifacts" "$RUNNER_TEMP/el10-build.log"
cp -a "$RUNNER_TEMP/el10-artifacts" el10-daily-stable-artifacts
else
{
echo 'EL10 Mock build log:'
cat "$RUNNER_TEMP/el10-build.log"
find "$RUNNER_TEMP/el10-artifacts" -type f -name '*.log' \
-exec sh -c 'echo; echo "Mock result log: $1"; cat "$1"' sh {} \;
} > failed-tests.log
fi
exit "$build_status"