fix(ci): preserve failed test and coverage artifacts
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/head This commit looks good

This commit is contained in:
2026-11-16 10:09:06 +00:00
parent e1e13b47ac
commit cd001ce2d9
2 changed files with 24 additions and 2 deletions
+19 -1
View File
@@ -32,6 +32,21 @@ HTML and archived test/coverage reports after a failed verification command.
Each publisher is isolated so one publisher error does not prevent the others
from being attempted. The build console retains compilation/setup diagnostics.
JUnit explicitly completes the `Test / Tests and coverage` check from the post
block. Its name must match the check required by Gitea, independently of the
publisher's stage context. The separate coverage check remains `JaCoCo Coverage`.
Coverage recording is enabled for failed builds so available coverage can still
be inspected after test failures. Coverage processing errors fail publication;
the isolated HTML and artifact publishers are still attempted. Archiving runs
even for failed or unstable builds and retains the original JUnit XML/binary
results, test HTML, coverage XML/HTML, and raw `**/build/jacoco/*.exec` files.
JUnit XML includes test failure details and captured output; the raw JaCoCo data
is retained even if consolidated XML/HTML generation fails. If no coverage data
was produced, there is no coverage artifact to recover; inspect the build console
and any available test results. Artifacts follow the Jenkins job's build/artifact
retention policy.
An otherwise successful verification must produce JUnit results, the packer
contract suite report, consolidated JaCoCo XML and HTML. Missing successful-build
evidence fails publication. A failed compilation may have no reports: the
@@ -54,4 +69,7 @@ A Jenkins run is needed to observe actual report publication and coverage checks
report any unavailable controller validation explicitly.
Jenkins behavior references: [post conditions](https://www.jenkins.io/doc/book/pipeline/syntax/#post)
and [catchError](https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#catcherror-catch-error-and-set-build-result-to-failure).
and [catchError](https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#catcherror-catch-error-and-set-build-result-to-failure),
[JUnit check names](https://www.jenkins.io/doc/pipeline/steps/junit/),
[coverage recording on failed builds](https://www.jenkins.io/doc/pipeline/steps/coverage/),
and [artifact archiving](https://www.jenkins.io/doc/pipeline/steps/core/#archiveartifacts-archive-the-artifacts).