A failed CI/CD pipeline is an automated run that stopped before it could build, validate, package or deliver a change. The cause may sit in the code, the tests, a dependency, the runner or agent, the pipeline configuration, the target environment or the deployment itself. Each needs a different response, so the first useful question is where the run stopped and why, not how quickly it can be started again.
Rerunning straight away is sometimes correct and often misleading. On GitHub Actions, a re-run uses the same commit and ref as the original run, so a deterministic code error will simply fail again, while an intermittent fault may pass and leave the underlying problem in place.
This guide follows the path from first response to release decision: how to read a failed run, how to find the cause, how to handle failing tests, how Jenkins, GitHub Actions and Azure DevOps differ, when to rerun, fix or stop, and when a failed deployment should be rolled back or rolled forward. The framework below is a map for that path. It is an IQLancer editorial model, not an official industry standard.
Detect the failure → Locate the stage and assess impact → Classify the likely cause → Collect evidence → Choose a recovery action → Validate the recovery → Document the cause and prevent recurrence
Figure 1. Editorial troubleshooting framework for a failed CI/CD pipeline. Stages and tooling vary between organisations.
What Should Engineers Do Immediately After a CI/CD Pipeline Fails?
Immediately after a failed CI/CD pipeline, engineers should identify which stage failed, decide whether the failure belongs to integration or delivery, judge how serious it is for the release, and save the logs and reports before rerunning anything. These steps protect the evidence and stop the team from treating every red run the same way.
Identify the Failed Pipeline Stage
The stage that failed tells you which class of problem you are facing. Typical stages are source checkout and dependency installation, build and compilation, automated testing, artifact creation and storage, deployment, and post-deployment verification. A deployment pipeline usually compiles first and passes the resulting binaries to later stages, which is why a late failure raises the question of what was already built and validated. Stage names and order differ between teams, but the reading is consistent: a checkout failure points towards repository access, a test-stage failure points towards behaviour, and a deployment failure points towards the target environment or release configuration. Finer detail, such as matrix cells and skipped jobs, is handled in the investigation steps later in this guide.
Determine Whether It Is a CI or CD Failure
A CI failure occurs while integrating code, building the application or running automated validation. A CD failure occurs during delivery or deployment, potentially after the build and its tests succeeded. The terms are not interchangeable because the recovery differs. After a CI failure nothing has been released, so the team fixes the cause and reruns while the last good version keeps running. After a CD failure the artifact may be sound, but the target environment may already have changed, so the first question becomes what state that environment is in now. Organisations also differ on whether the final step needs a human approval, so confirm what your pipeline’s last stage actually does.
Assess Severity and Release Impact
Severity is a judgement about the release, not about how red the run looks. A workable split is:
- Blocking errors: build failures and failing required tests. The change cannot proceed.
- Transient infrastructure failures: a lost runner or a registry timeout with no link to the change.
- Warnings and unstable results: in Jenkins, an unstable status is usually caused by test failures or code violations, so check whether your pipeline treats it as blocking.
- Security failures: a failed vulnerability, secret or policy check. These need a hold and an owner.
- Deployment problems: a rollout that failed, stalled or failed verification.
- Production incidents: user-visible impact. These move into incident management.
Who assigns severity depends on the organisation. Often it is the release owner with input from QA or QE, the service owner and the engineers closest to the failing stage.
Preserve Logs and Diagnostic Evidence
Capture the following before rerunning or editing the pipeline:
- The run ID and link, commit SHA, branch and trigger.
- The failed job or step name and its exit code.
- The complete raw logs, downloaded rather than screenshotted, plus test reports and any produced artifacts.
- The runner or agent identity, image and tool versions.
- The pipeline definition as it was at that commit.
- The time the failure began and the status of external services at that moment.
Two platform behaviours make this urgent. On GitHub, a log archive downloaded after a partial re-run only contains the jobs that were re-run, and runs can only be re-run for 30 days. In Jenkins, the buildDiscarder option keeps artifacts and console output only for a set number of recent runs, so old evidence can disappear by policy.
What Are the Most Common Causes of CI/CD Pipeline Failures?
A failed CI/CD pipeline usually traces back to one of eight categories: build errors, test failures, flaky tests, dependency problems, artifact and versioning mistakes, runner or agent faults, environment, configuration and permission errors, or deployment and infrastructure failures. The stage that failed narrows the list, and a visible symptom is a clue, not proof of the cause.
No authoritative source ranks these by frequency, so the order below follows the pipeline, not a statistic.
Build and Compilation Errors
These stop the pipeline before any test runs. Typical origins are syntax or type errors, a missing generated file, an incompatible compiler or SDK version, and a build script that behaves differently on the runner than on a developer machine. Compilers often report many follow-on errors after one root fault, so the first error is usually the useful one.
Automated Test Failures
A test fails when its assertion, setup or timing does not match what the system does. The cause may be an application defect, a defect in the test code, bad test data, or the environment. Because these need their own method, they are covered in full in the automated-testing section.
Flaky Tests and Unstable Test Environments
Flaky tests pass and fail on the same code. Here the classification matters: if rerunning changes the result with no code change, treat the failure as intermittent and look at timing, shared state and environment before blaming the change. The diagnosis and handling are in the automated-testing section.
Dependency and Package Installation Failures
Typical causes are version conflicts, a package registry that is unreachable, missing or expired credentials for a private feed, and a lockfile that no longer matches the manifest. A pipeline can fail with no new commit when an unpinned dependency range resolves to a newer release, so the failure can look unrelated to any change in the repository.
Build Artifact and Versioning Problems
Symptoms include an artifact that cannot be found, one that has expired, two builds sharing a version number, or a deployment that picked up a different build from the one that passed testing. Retention rules matter here: in Jenkins, stash contents are normally cleared when a Pipeline finishes unless preserveStashes is configured, which affects restarting from a later stage. The principle that avoids most of these problems is to build once and deploy that same artifact everywhere, covered under prevention.
Runner and Agent Failures
The job cannot start, loses its connection, runs out of disk or memory, or is killed on timeout. Azure Pipelines documents job time-outs and an agent that stops responding as common issues, and GitHub advises unique label names for larger and self-hosted runners because a label that matches a preset label can cause runner assignment problems.
Environment, Configuration and Permission Errors
These include missing or misnamed variables, expired secrets, a service connection the pipeline is not authorised to use, and differences between environments. Azure Pipelines, for example, can stop a run with a message that the pipeline needs permission to access a resource before the run can continue. Symptoms are usually clear (access denied, variable not set), but the owner is not: the fix may sit with the developer, the platform team or whoever administers the secret.
Deployment and Infrastructure Failures
The artifact is fine but the rollout fails: a health check does not pass, the target lacks capacity, configuration differs from staging, a network rule blocks the new version, or a database migration fails. These are the failures where partial changes to the target environment are possible, which is why they connect to the rollback section.
| Failure type | Typical symptoms | Initial diagnostic checks |
|---|---|---|
| Build error | Compilation stops | Compiler output and recent code changes |
| Dependency conflict | Package installation fails | Package versions and registry access |
| Test failure | Test job reports failures | Test reports, assertions and test data |
| Runner failure | Job cannot start or complete | Agent status and resource availability |
| Configuration error | Missing variables or permissions | Environment settings and access policies |
| Deployment failure | Deployment or health check fails | Deployment logs and environment health |
Table 1. Failure categories, symptoms and first checks. Treat each symptom as a lead to test, not as a confirmed cause.
How Do You Troubleshoot a Failed CI/CD Pipeline Step by Step?
To troubleshoot a failed CI/CD pipeline, find the first failing job, read its logs and test reports for the earliest real error, compare the run with the last successful one, review what changed, check the runner and external services, reproduce the failure, then fix it and validate with a fresh run. Each step narrows the cause before any recovery action.
Each step below states what to inspect, what evidence to keep, what the findings may mean and what decision follows.
Step 1. Identify the Failed Pipeline Stage or Job
Inspect. The run summary or stage view, to find the first job that failed, not the last one to turn red. Jobs that depend on a failed job are skipped or cancelled, and Jenkins can be configured so that parallel sibling stages abort when one fails, so cancelled siblings are consequences, not causes. In a matrix or parallel build, note whether every cell failed or only one.
Collect. Job and step name, exit code, start and end times, and which matrix combination failed.
It may indicate. If every cell fails the same way, suspect code or shared configuration. If only one operating system, language version or browser fails, suspect that platform, its tool version or its environment.
Decision. Choose the investigation path (code, test, dependency, runner, configuration or deployment) before opening a single stack trace.
Step 2. Inspect Logs, Error Messages and Test Reports
Inspect. The log of the failed step, reading upward from the final error to the first abnormal line, plus structured test reports where they exist. The last error is often a symptom: one missing symbol can trigger dozens of compiler errors, a test can fail on a null left by an earlier setup problem, and a script can end with a generic exit code while the real message appeared earlier. Read stack traces for the deepest reported cause in your own code. Check exit codes too: a Linux build killed by the out-of-memory killer can end with exit code 137.
Collect. The first error message with some lines of context before it, the full stack trace, the test report and timestamps.
It may indicate. A named file and line points to code. Connection, DNS or timeout messages point to the network or an external service. Access-denied messages point to permissions or expired credentials. A signal-based exit points to resource limits.
Decision. If the message is specific, move on to Step 3. If it is generic, get more output. GitHub Actions and Azure Pipelines both offer extra debug logging, described in the platform section.
Step 3. Compare the Failed Run With the Last Successful Run
Inspect. The last good run and the failed run side by side: commit range, pipeline definition, tool and base-image versions, resolved dependency versions, variable names (not secret values), the runner used and the time each stage took. In Jenkins, the regression and changed post conditions react to a status change from the previous run, which can drive an automatic notification.
Collect. The differences between the two runs, written down.
It may indicate. Same commit but a different result suggests the environment, an external service or flakiness. A different commit suggests a change-related cause. A stage that became much slower before failing suggests a resource or dependency problem.
Decision. Same commit: go to Step 5 first. Different commit: go to Step 4 first.
Step 4. Investigate Recent Code, Configuration and Dependency Changes
Inspect. Everything changed in the range: application code, test code, the pipeline definition, build scripts, dependency manifests and lockfiles, infrastructure and configuration repositories, and any credential rotation. A pipeline can also fail with no commit at all when a floating image tag, an unpinned dependency or an expired credential changed underneath it. For a long range, bisect the commit range (for example with git bisect) to find the first bad change.
Collect. Candidate commits, their authors and pull requests, and the dependency differences.
It may indicate. A change in the failing module suggests a developer-owned fix. A change to the pipeline file or runner image suggests the platform or DevOps owner. A dependency change suggests a version policy question.
Decision. Record a suspected owner and a hypothesis. Some teams revert first to keep the main branch releasable. That is an organisational choice and it still needs the cause recorded.
Step 5. Check the Build Environment, Runner and External Services
Inspect. The environment around the code: runner health and capacity (disk, memory, CPU), image and tool versions, network paths, and external services such as registries, cloud APIs and the platform status page. GitHub’s troubleshooting guide lists DNS, firewalls, proxies and certificates as network causes to check, and Azure Pipelines can add disk, memory and CPU readings to the logs when verbose logging is on. Expired secrets and tokens belong in this check too.
Collect. Runner name and image, resource readings, a status-page snapshot, and the time the first network error appeared.
It may indicate. One runner failing repeatedly points to that runner. Failures clustered in time across unrelated pipelines point to a shared service or platform problem.
Decision. If a transient infrastructure cause is supported by evidence, a controlled rerun may be justified (see the rerun, fix or stop section). If not, continue.
Step 6. Reproduce the Failure and Confirm the Root Cause
Inspect. Whether you can make the failure happen on demand with the same inputs: the same commit, container image or tool versions, variables and data. Run the failing command in isolation first, then inside the pipeline with debug logging. For intermittent failures, run it repeatedly and record how often it fails and under what conditions. Google describes a flaky result as one that both passes and fails with the same code, so a single pass proves little.
Collect. The reproduction steps, the command and its outcome, the failure rate if intermittent, and the one variable whose change makes the failure appear or disappear.
It may indicate. A root cause is confirmed when you can predict the failure, remove it with a targeted change and bring it back by undoing that change. If you cannot reproduce it, you have a hypothesis, not a diagnosis.
Decision. Confirmed: move to Step 7. Not reproducible: record it as unresolved, add logging for the next occurrence and do not describe it as fixed.
Step 7. Apply the Fix and Validate the Pipeline Again
Inspect. The smallest change that addresses the confirmed cause, in the right place: application code, test code, pipeline configuration, dependency pinning or environment definition. Prefer a fix that also adds a guard, such as a regression test or a validation step, so the same cause fails early and clearly next time.
Collect. The fix commit, the new run, and evidence that the failing condition was actually exercised, for example the previously failing test now passing with normal stage timings.
It may indicate. A green rerun of the same commit proves little for an intermittent cause. A new commit run through all downstream stages is stronger evidence. Because GitHub re-runs reuse the original commit, a code fix needs a new commit and a new run.
Decision. If the evidence matches the hypothesis, the pipeline can resume and the release decision is next. If the failure was in deployment, continue with the rollback section.
What Should You Do When Automated Tests Fail in CI/CD?
When automated tests fail in CI/CD, first check whether the failure is reproducible, then classify it as an application defect, a test-code defect or an environment problem before choosing a fix. A failure that reproduces on unchanged test code often points to the application or its data, while one that passes on a rerun signals instability that still needs investigation.
Distinguish Application Defects From Test-Code Defects
Ask three questions. Did the expected behaviour legitimately change, so the test is now out of date? Does the test assert an implementation detail instead of an outcome? Does the failure reproduce locally with the same inputs? If the test is right and the behaviour is wrong, the application has a defect and the developer who owns the change normally fixes it. If the behaviour is right and the test is wrong, the test needs correcting, usually by whoever owns the suite, which may be a developer or a QA or QE engineer depending on the team.
One trap to avoid: loosening an assertion or skipping a test to turn the pipeline green converts a visible problem into a hidden one. QA or QE input is most valuable at this point, because it can state what risk a changed or removed check leaves uncovered.
Understand Different Types of Test Failures
| Test type | Typical failure sources | First check |
|---|---|---|
| Unit | Logic errors, stale expectations, state shared between tests | The failing assertion and the code it exercises |
| Integration | Contract mismatches, service startup, configuration, test data, network | Service logs, startup timing, configuration and data state |
| API | Status codes, schema changes, authentication, environment URLs | Request and response, tokens, target environment |
| End-to-end | Selectors, timing, browser or driver versions, environment state | Screenshots or traces, waits, environment health |
Table 2. Test failure types and where to look first.
Scope matters. Fowler notes that non-determinism can affect any test but is especially likely in broad-scope acceptance and functional tests, and Google found that larger tests were more likely to be flaky. That is why a failing end-to-end test deserves more suspicion of environment and timing than a failing unit test, although it can still be a genuine defect.
Investigate Flaky Tests
Flaky tests are not harmless noise. Fowler warns that when a non-deterministic test goes red you cannot tell whether it reflects a bug, so people start shrugging at red results and real failures get ignored along with them. The problem is not rare at scale: Google reported in 2016 that about 1.5 percent of its test runs showed a flaky result.
Common sources are tests that share state or depend on execution order, waits and timing assumptions, calls to remote services, dependence on the clock, and leaked resources. Fowler names lack of isolation as a common and frustrating cause, and Google has described using hermetic, ephemeral test environments to reduce flakiness.
To investigate, run the test alone and inside the suite in different orders, repeat it enough times to estimate a failure rate, capture logs and state when it fails, and compare passing and failing runs for what differs (time of day, parallelism, data, runner). An intermittent failure can also be a real product defect such as a race condition, so classify it before dismissing it.
When Should Teams Quarantine a Flaky Test?
Quarantine is a temporary containment step. It is justified when the test is demonstrably non-deterministic, it is blocking unrelated work, and the risk it covers is low or covered elsewhere. Fowler advises keeping non-deterministic tests in a separate suite from healthy tests and fixing them quickly. He also warns that quarantined tests get forgotten, and suggests mechanisms such as a cap on how many tests may sit in quarantine.
A defensible quarantine has a named owner, a ticket holding the evidence, a visible list, a review date or cap, and continued execution so results are still collected. If the test covers a critical path such as payments or authentication, quarantining it is a risk acceptance. That decision belongs with someone authorised to accept the risk, not only the engineer who is blocked, and who that is depends on the organisation.
Why Repeatedly Rerunning Failed Tests Is Not a Solution
A rerun that passes answers one question: the failure did not happen this time. It does not say why it happened, whether it will happen in production, or whether the test is hiding a defect. Repeated reruns also teach a team to ignore failures, which Fowler describes as something that can destroy the value of a regression suite.
Automated reruns are not always wrong. Google lists re-running only failing tests, or re-running automatically on failure, among its presubmit mitigations. The difference is control. A responsible policy limits the number of attempts, records the first-attempt result separately from the final result, flags any test that needed a retry, and treats a rising retry rate as a defect to fix. In Jenkins, the retry option reruns a failed Pipeline or stage a set number of times, which is a convenient switch and an equally convenient way to hide a problem if nobody reads the retry count.
Illustrative Scenario: An Integration-Test Failure After a Successful Build
This is an illustrative engineering scenario written for this article. It is not a real company incident, and the figures are invented to show the reasoning.
What the pipeline reports. A developer pushes a change to an orders service that loads reference data when the service starts. The build and unit-test stages pass. The integration-test stage fails: two of 48 tests time out with a message that the service did not report ready within 30 seconds. The other 46 pass.
What the engineer investigates. Three hypotheses fit this pattern, and each predicts something different.
- The runner was slow or contended (environment). That predicts other jobs on the same runner were also slow and that failures spread across unrelated tests.
- The harness timeout is too tight (test-code issue). That predicts the service does become ready, only later than 30 seconds.
- The change slowed startup (application defect). That predicts startup was faster on the last successful run on the same runner type.
Logs and test evidence. The service log shows the reference-data load starting at second 3 and finishing at second 34. The test report shows that only the two tests which start a fresh service instance timed out, while tests that reuse a running instance passed. That fits a startup problem, not general instability. Comparing with the last successful run shows startup completing in about 9 seconds, and other jobs on the same runner type finished in their usual time.
Separating application, test and environment. Hypothesis 1 is weakened because other jobs were normal. Hypothesis 2 is true only in a narrow sense: the service did become ready, but the timeout had not changed and the previous run passed, so the timeout is not the origin. Hypothesis 3 matches. The commit added a synchronous reference-data load that now dominates startup in CI, where the test database holds a larger data set than a developer machine. The engineer confirms this by starting the service locally with and without the commit, using a CI-sized data set. Startup time is reproducible and tracks the change.
Recovery action. Raising the timeout would turn the pipeline green but would hide a real behaviour change, and a slower startup could also break a readiness check in production. The team instead loads the data lazily on first use and caches it, so startup returns to its earlier profile.
Validating the fix. The fix goes in as a new commit and runs through the build, unit and integration stages. The engineer checks that the two tests pass and that startup time is back near the earlier figure, not only that the run is green. Deployment verification in staging will later exercise the same readiness check.
What changes to prevent recurrence. The harness now prints the service log when a readiness wait times out, so the next failure shows the startup timeline immediately. Startup duration is recorded on every run, and a test asserts that it stays inside an agreed budget. The size of the CI test data set is documented so developers can reproduce it locally.
How Do You Debug Jenkins, GitHub Actions and Azure DevOps Pipeline Failures?
To debug Jenkins, GitHub Actions or Azure DevOps pipeline failures, open the failed stage, job or task, read its logs, and switch on the platform’s extra diagnostics when the default output is too thin. Jenkins centres on console output and stage views, GitHub Actions on job logs and debug variables, and Azure Pipelines on task logs and system diagnostics.
The platform behaviour below was checked against each vendor’s official documentation in November 2026. Menus and options change, so confirm against the current documentation before relying on a detail.
How to Debug Jenkins Pipeline Failures
Where to look. Open the build page of the failed run. The classic Jenkins sidebar offers Console Output, Pipeline Console, Pipeline Steps, Restart from Stage and Replay, and the Pipeline Graph View plugin lets you click a stage and restart it. Start with the red stage and read its console output. Test results appear only if the Pipeline publishes them.
Configuration problems worth checking.
- Timeouts and agents: with a top-level agent, the timeout option starts counting after the agent is allocated, but with a stage-level agent the time spent waiting for an agent counts. A busy agent pool can therefore fail a stage on timeout before any of your code runs.
- Credentials: an unsupported credentials type used with the credentials() helper fails the Pipeline with a CredentialNotFoundException.
- Memory: a build killed by the operating system can show exit code 137.
Diagnostic example. This Jenkinsfile fragment adds timestamps, bounds a hung run and keeps test reports even when a stage fails. The label and report path are placeholders.
pipeline {
agent { label 'linux' }
options { timestamps(); timeout(time: 30, unit: 'MINUTES') }
stages {
stage('Integration tests') {
steps { sh './run-integration-tests.sh' }
}
}
post {
always { junit 'reports/**/*.xml' }
}
}
The timestamps option prefixes console lines with the time they were emitted, which shows where time went, and the always post condition runs whatever the completion status, so the report is published for failed runs too.
Next steps. A Declarative Pipeline can be restarted from a top-level stage, which suits a stage that failed for transient or environmental reasons, and it keeps the same SCM information, parameters and stashes. Restart does not repair a code or configuration fault. For those, fix and run a new build.
How to Debug GitHub Actions Workflow Failures
Where to look. Open the Actions tab, then the workflow run, the failing job and the failing step. Logs for each job can be viewed, searched and downloaded.
Extra diagnostics. Setting ACTIONS_STEP_DEBUG to true as a secret or variable adds debug events to step logs, and ACTIONS_RUNNER_DEBUG adds runner diagnostic files to the log archive. For a single run, choose Enable debug logging when re-running, or use the –debug flag with the GitHub CLI. Tool-level verbosity helps too: GitHub gives npm install –verbose and GIT_TRACE=1 GIT_CURL_VERBOSE=1 as examples.
Configuration problems worth checking.
- A job skipped or run unexpectedly: download the log archive and read the Evaluating, Expanded and Result lines in the job’s system.txt to see the runtime values behind an if condition.
- A workflow that did not start: pull_request workflows do not run when the pull request has a merge conflict, and some events only run from the default branch.
- Failures with no code cause: billing or storage limits can make workflows fail.
- Permissions: a re-run uses the privileges of the actor who first triggered the workflow, not the person who clicked re-run.
Diagnostic example.
gh run view --job JOB_ID --log-failed
gh run rerun RUN_ID --failed --debug
The first command limits output to failed steps, as GitHub’s log documentation shows for the CLI. The second reruns only the failed jobs with runner diagnostic and step debug logging. Failed jobs and their dependents run again, while outputs and artifacts from the earlier run are reused.
Next steps. A transient cause may justify a debug re-run of the failed jobs. A code fix needs a new commit, because the re-run reuses the old one.
How to Debug Azure DevOps Pipeline Failures
Where to look. Open the pipeline run summary, select the job and then the failing task, and read that task’s log.
Extra diagnostics. Choose Enable system diagnostics when running the pipeline for one run, or add a system.debug variable set to true to make every run verbose. Turning on System.Debug also sets Agent.Diagnostic automatically on supported agent versions, and verbose logs on Azure DevOps Services include disk, memory and CPU readings, which helps when you suspect resource limits.
Configuration problems worth checking. Microsoft’s troubleshooting page lists permission prompts for resources such as service connections and agent pools, job time-outs, problems downloading code, command-line step failures, and an agent that stopped communicating. A permission prompt is solved by authorising the pipeline for that resource, and rerunning without doing so will not change the result.
Diagnostic example.
variables:
system.debug: true
Add this on a working branch while investigating and remove it afterwards, because verbose logs are larger and harder to scan.
Next steps. Azure Pipelines can retry a failed stage, which re-attempts the failed jobs and the jobs that depend on them. That feature was announced in a 2019 release note, so check the current behaviour in your organisation before relying on it.
Should You Rerun, Fix or Stop a Failed CI/CD Pipeline?
Rerun a failed CI/CD pipeline only when the evidence points to a transient infrastructure fault, fix it when the cause is reproducible in code, tests or configuration, and stop it when the cause is unknown, security related or could affect production. A rerun is an experiment, not a repair, so record why it was chosen.
When Should You Rerun a Failed Pipeline?
Rerun when the evidence points away from your change and towards a transient condition: a runner that disappeared, a registry or cloud API timeout, or a network fault that coincides with a platform incident. Keep the rerun narrow. GitHub can rerun only the failed jobs and their dependents, and Jenkins can restart from a failed top-level stage, which saves time and avoids repeating healthy work. Write down why you reran it and keep the first failure’s logs. If the same failure returns, stop treating it as transient.
When Should You Fix the Code, Test or Configuration?
Fix when the failure reproduces, or when the evidence identifies a specific defect even if reproduction is partial. The owner depends on where the defect sits: usually a developer for application code, the test owner (a developer or QE engineer) for test code, DevOps or platform engineers for pipeline definitions and runners, and the dependency or service owner for upstream faults. These assignments vary between organisations.
The fix should travel through the same pipeline as any change, with a new commit and a full run, and the root cause should be recorded so the next engineer does not rediscover it. A pipeline-configuration change that affects many repositories deserves review as carefully as a production change.
When Should You Stop the Pipeline?
Stop when continuing could do harm or when the failure is not understood. Typical triggers are an unknown failure, a failed security or policy check, evidence that the pipeline itself cannot be trusted (for example gates being skipped or tests not running), and a deployment that has partly completed. Stopping means holding promotion and deployment, preserving the evidence and bringing in the right owner. The approach matches AWS guidance that deployment pipelines can halt before production deployment when anomalies are detected.
When Is Flaky-Test Isolation Appropriate?
Isolation fits when a test is shown to be non-deterministic and its risk is accepted or covered elsewhere, using the quarantine criteria set out earlier. It does not fit when the failure is reproducible, when “flaky” is only a guess, or when the test guards a high-risk path that nothing else covers.
| Situation | Recommended action | Evidence to have first |
|---|---|---|
| Temporary infrastructure failure | Investigate and retry when justified | Log lines showing a network, runner or service fault, ideally matching a platform status report |
| Compilation error | Fix the code or build configuration | Compiler output tied to a specific change |
| Reproducible test failure | Investigate application or test defects | Failure reproduced with the same inputs, assertion and data reviewed |
| Flaky test | Investigate instability and manage isolation carefully | Pass and fail on the same code, with failure rate and conditions recorded |
| Missing dependency or artifact | Correct dependency or artifact handling | Registry, version or retention check, and confirmation of which artifact the stage expected |
| Security validation failure | Hold the release and investigate | The finding itself, its severity and its owner |
| Unknown failure | Stop, preserve evidence and investigate | Logs, run identifiers and a list of what has been ruled out |
Table 3. Rerun, fix or stop decisions and the evidence behind them.