← CI/CD: build, validate, and deliver
04 / 6 · 40 MIN

Tests and decisions

Ensure relevant failures stop promotion without losing diagnostics.

Concept and mechanism

Collecting results and enforcing criteria are related but different responsibilities. A command may fail while the pipeline continues to publish its report; this is useful if failure remains visible and prevents inappropriate promotion. In Jenkins, the junit step may mark a build UNSTABLE. If the shell was configured to return success despite failures, later stages need to consider the recorded result. Otherwise, an important decision was unintentionally removed. Do not rely solely on stage color or the final exit code. Identify which test ran, against which artifact, with what result, and which rule authorizes continuation.

Guided application

In a fictional example, integration fails while reconciling a financial file. Rerunning until green does not explain failure or establish stability. Preserve logs without sensitive data, compare environment and inputs, and assign investigation. If a temporary exception exists, state scope, risk, authority, and review date rather than hide the test. Distinguish infrastructure errors from application defects. In Azure DevOps Services, resource approvals and checks are managed outside YAML by resource administrators; editing the pipeline file does not directly change those controls. The stage needs to satisfy checks on consumed resources. Human approval also does not replace tests that remain failing.

IN PRACTICE

A published test report with UNSTABLE is not satisfied promotion criteria.

Common pitfalls

Suppressing exit code as correction; retrying until green; approval as substitute for evidence.

Related topics: Integration and delivery · Jobs and dependencies · Artifacts and evidence

Take this idea with you

Retain diagnostics and keep test outcome connected to the decision to proceed.

Create account

Reference: Test result handling artifacts and credential scope · CI/CD practices 2026-09; scoped GitHub Actions GitLab Jenkins and Azure DevOps Services documentation