fix(ci): save build logs to PVC for post-mortem debugging

Pipe clippy and test output to /cargo-target/*.log via tee so errors
are readable after pod GC. Fixes blind CI failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-19 10:37:44 +01:00
parent 9e530e31bb
commit 3cec1a415e

View File

@@ -357,17 +357,16 @@ spec:
done
echo "=== Running clippy (lib targets) ==="
cargo clippy --workspace --lib -- -D warnings
cargo clippy --workspace --lib -- -D warnings 2>&1 | tee /cargo-target/clippy.log
echo "=== Running tests (lib only, no integration) ==="
set +e
cargo test --workspace --lib > /tmp/test-output.log 2>&1
cargo test --workspace --lib 2>&1 | tee /cargo-target/test-output.log
TEST_EXIT=$?
set -e
cat /tmp/test-output.log
if [ "$TEST_EXIT" -ne 0 ]; then
echo "=== TEST FAILURES ==="
grep -A5 'FAILED\|panicked\|test result: FAILED' /tmp/test-output.log || true
grep -A5 'FAILED\|panicked\|test result: FAILED\|error\[' /cargo-target/test-output.log || true
exit "$TEST_EXIT"
fi