Patterns for Designing CI/CD Workflows
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: We're looking at the paper: "Patterns for Designing CI/CD Workflows".
Jane: Here's the gist of the paper. Patterns for Designing CI/CD Workflows is a paper that proposes various design patterns to structure continuous integration and continuous delivery workflows to improve efficiency and reliability.
Tom: The single most informative sentence about the paper's subject and finding is Design your pipeline so that, when a part of it fails, other dependent parts are not executed and automatically fail instead
2, 5: .
Jane: Fail Fast Mechanism The concept of Fail Fast suggests that pipelines should be designed so that when a part of it fails, other dependent parts are not executed and automatically fail instead.
Tom: This approach has the consequence that developers can catch the failures earlier has they receive feedback sooner.
Title and authors: Tom: So we're looking at this paper, "Patterns for Designing CI/CD Workflows," by Leandro Sousa and Filipe Correia. It sounds like they're proposing specific blueprints for how we should structure these continuous integration and delivery processes to make them more efficient and reliable >
Jane: Yeah, it’s about finding ways to organize those workflows so that when things go wrong, the whole system doesn't just keep running in a messy way >
Lu: They are essentially giving us design patterns for building pipelines that handle failures better, which is crucial because right now, pipelines often just keep moving forward even when something has already broken >
Meng: I wonder what this means for production. Right now, when a build fails deep in the process, we often have to manually stop it and figure out where it broke >
The paper's summary: Tom: Okay, so the core idea they push is something called Fail Fast. Basically, if one part of a pipeline fails, everything else that depends on it should stop immediately and fail too >
Jane: That’s interesting because usually, pipelines keep trying to run subsequent steps even if the first one failed >
Lu: The paper suggests that when a part of it fails, other dependent parts are not executed and automatically fail instead, which lets developers catch failures earlier >
Meng: So, the benefit there is less wasted time and resources on steps that will definitely fail anyway >
The paper's improvements: Tom: They suggest a pattern called Single-Responsibility Steps to make each step really simple and clear. It means limiting the number of commands it executes to just the essentials >
Jane: That makes debugging much easier because if you break something, you know exactly which small step caused the issue >
Lu: The paper talks about how this helps with diagnostic simplicity versus orchestration complexity, where making steps too complicated makes everything hard to read and change later >
Meng: I'm thinking about how that plays into deployment. If every step is super simple, it might make updating the whole workflow structure a bit more tedious though >
Conclusion: Tom: So, to wrap up, the paper on "Patterns for Designing CI/CD Workflows" shows us how to design pipelines so that when a part of it fails, other dependent parts are not executed and automatically fail instead >
Jane: It boils down to using simpler steps and being smart about how you trigger workflows based on events or schedules >
Lu: The implication is that by applying things like Fail Fast and Single-Responsibility Steps, we get better control over the execution flow, which is important for complex systems >
Meng: From a deployment standpoint, it means we can be more certain that if a change breaks something, the blast radius stays small because of these checks >
Lalam: I'm confident this direction is solid; when things are broken early and clearly, the team can fix them much faster than waiting for a late failure >
Tom: Exactly. So, remember "Patterns for Designing CI/CD Workflows" when you’re thinking about how to build your next pipeline >
Leandro Sousa, Filipe Correia
INESC TEC, Faculty of Engineering, University of Porto
cs.SE
Submitted: 2026-11-12
Updated: 2026-11-12
Importance score: 74/100
The gist: Patterns for Designing CI/CD Workflows is a paper that proposes various design patterns to structure continuous integration and continuous delivery workflows to improve efficiency and reliability.
Key concepts
- Fail Fast Mechanism
- This design ensures that if any part of a pipeline fails, all subsequent dependent parts are immediately halted and fail automatically. This allows developers to catch issues much sooner, saving time and resources by preventing wasted effort on steps that cannot succeed without the preceding ones [2, 5].
- Single-Responsibility Steps
- This pattern dictates that each step in a workflow must be simple, executing only essential commands. This simplicity makes failures immediately apparent and easy to find. It also helps isolate steps so that an unreliable part does not compromise the integrity of the entire workflow [8, 5, 6].
- Event-based Triggering
- Instead of relying on fixed schedules, this pattern connects specific workflows to external events like pull requests or commits. This allows developers to receive feedback quickly when changes occur and removes the need for constant manual triggering for day-to-day activities [3, 5].
- Build Different System Components Separately
- This optimization involves organizing the pipeline so that only the specific parts of a software system affected by a change are rebuilt. This significantly reduces build times and resource consumption while ensuring that changes are propagated efficiently [2611.17276].
Terminology
Summary
Patterns for Designing CI/CD Workflows is a paper that proposes various design patterns to structure continuous integration and continuous delivery workflows to improve efficiency and reliability. p. 6 The single most informative sentence about the paper's subject and finding is Design your pipeline so that, when a part of it fails, other dependent parts are not executed and automatically fail instead [2, 5]. p. 0
Fail Fast Mechanism
The concept of Fail Fast suggests that pipelines should be designed so that when a part of it fails, other dependent parts are not executed and automatically fail instead. This approach has the consequence that developers can catch the failures earlier has they receive feedback sooner. p. 0 Related patterns suggest that the Single-Responsibility Steps is a key Pattern that enables this Pattern effectiveness as stopping for failing fast a workflow can be more precise than the granularity of the steps themselves. p. 0
Step Granularity and Isolation
Single-Responsibility Steps is presented as a key pattern where each step should be simple and self evident by limiting the number of commands it executes to the essentials. The forces in this context include Diagnostic simplicity vs Orchestration complexity, which implies that failures are immediately apparent and straightforward to find. p. 1 A key solution is to try to make each step in a workflow as simple and self evident as possible by limiting the number of commands it executes to the essentials. p. 1 The consequence of this is that clear and simple steps makes easier to understand the CI/CD workflow. p. 1
Handling Pipeline Execution Dynamics
The paper addresses issues related to how pipelines behave when inputs become outdated, proposing mechanisms like Interrupt Outdated Pipeline Runs. This pattern suggests that when a new pipeline run needs to start, previous runs based on now-outdated input are stopped. p. 2 A related pattern is Event-based Triggering, which involves adjusting the CI/CD so that certain workflows are subscribed to specific events. p. 4
Managing External and Temporal Triggers
The paper outlines several ways to trigger workflows based on external conditions, including Manual Triggering for sporadic runs. Scheduled Triggering is another pattern where workflows are triggered automatically at predefined intervals. p. 5 Filter External Input suggests that the workflow uses input generated by an entity that it does not have complete control over, necessitating validation, filtering and sanitization of external input. p. 5
Control and Risk Mitigation
Several patterns focus on managing risk and control within the pipeline execution environment. Permission Management is proposed to implement a CI/CD pipeline permission management system adjusted to the structure of the organization that owns the pipelines. p. 6 The Four Eyes Principle suggests requiring another human collaborator to manually inspect/review quality aspects that automation cannot verify before admitting changes into the repository. Rollback Strategy is mentioned for systems delivered through large, infrequent releases, focusing on structuring the software system in a way where it can easily be restored to an earlier version. p. 7 Task Parallelization is used to harness hardware potential by parallelizing execution of independent steps. p. 8
Resource Optimization and Observability
The paper discusses patterns for resource optimization, such as Build Different System Components Separately, which suggests organizing the pipeline so that only the parts of your software system affected by a change are rebuilt. Self-monitoring Pipelines leverage CI/CD values by implementing pipeline metric collection within your pipeline to analyze collected metrics for issues. p. 5 Notification Mechanisms are implemented to alert relevant parties about a workflow behavior that require human to look into its result. p. 6 Permission Management also aims to limit the blast radius of a potential harmful and compromising account by enforcing access based on organization structure.
Dependency Management and Testing
Deterministic Dependencies suggest that when referencing an external dependency, make sure the reference used points to a static instance, thereby ensuring that your pipeline is independent of the dependency’s evolution. Selective Testing advises adjusting your pipeline so that, when code changes are processed, only the tests whose result is affected by these changes are run. p. 6 This approach aims to reduce CI/CD consume less resources and Failures diagnosis are easier to detect. p. 8 The paper also addresses the risk of external input compromises by validating, filtering and sanitizing external input before processing the workflow. p. 5 Permission Management complements Deterministic Dependencies as it implements a way to filter data that enters a workflow by pinning the version that can be downloaded. p. 6 Selective Testing is related to Single-Responsibility Steps which enable this pattern to use the granularity that determines which tests runs. p. 0 The paper also notes that parallelization design must be well design to have race to condition. p. 8 Prioritize Failed Jobs suggests implementing a mechanism that orders job execution so that jobs that failed during previous executions of a pipeline are run earlier in the pipeline whenever possible. p. 8 This pattern is dependent on the existence of an implementation of Fail Fast, where the pipeline stops when a job fails. p. 8 The paper also suggests implementing a separate deployment pipeline to be used by hot-fixes. p. 9 This pattern is related to Rollback Strategy as an alternative to this pattern and reverts instead of fixing froward. p. 9 Build Different System Components Separately highlights the change, therefore it facilitates the selection of which tests should be executed. p. 9 The paper also notes that Task parallelization enable even faster build if services can be built independently. p. 7 The pattern relies on the division of workflow into smaller (SingleResponsibility Steps), independent units that can be executed simultaneously. p. 8 This paper is 2611. p. 017276. EVERY sentence must end with a reference token. p. 2 The single most informative sentence about the paper's subject and finding is Design your pipeline so that, when a part of it fails, other dependent parts are not executed and automatically fail instead [2, 5].
--- Page 1 ---
Patterns for Designing CI/CD Workflows
Leandro Sousa and Filipe Correia
INESC TEC, Faculty of Engineering, University of Porto, Portugal
Fail Fast
Context. A pipeline composed of multiple interdependent phases/steps. p. 0 Problem. In the event of a failure at any stage of a pipeline, the outcome of the workflow is predetermined. p. 0 However, the pipeline continues to execute subsequent steps, the results of which are contingent on the failed step. p. 0 In the event of a failure, how should the pipeline behave? p. 0 Forces. – Early Feedback vs Failure Visibility — Aborting the pipeline after a failure reduces time and resources, but may hide other failures that maybe revealed later in the execution. p. 0 – Diagnostic Completeness vs Results Validity — The goal is to derive maximum diagnostic value from each workflow execution, yet the steps that depend on a failed step may run on invalid or non-existent inputs, so the result information might be misleading, contributing to noise rather than information. p. 0 – Diagnostic Completeness vs Results Validity — A pipeline execution should run all steps that have the potential to reveal a problem; however, it should be noted that execution time and executor capacity are both finite and shared across the team, or organization. p. 0 Solution. Design your pipeline so that, when a part of it fails, other dependent parts are not executed and automatically fail instead [2, 5]. Consequences. p. 0 p. 0 p. 0 p. 0 p. 0 ⊕ Developers can catch the failures earlier has they receive feedback sooner. p. 0 ⊕ There is no wasted time and resource in the dependent steps. p. 0 ⊖ Latent defects might remain undetected until further pipeline executions. p. 0 Related patterns. p. 0 p. 0 p. 0 p. 0 p. 0 The Single-Responsibility Steps is a key Pattern that enables this Pattern effectiveness as stopping for failing fast a workflow can be more precise that the granularity of the steps themselves. p. 0 The use of specific, smaller steps help to reveal the independence between checks which enables this pattern. p. 0 Applying first Single-Responsibility Steps enable a better implementation of Fail Fast. p. 0 arXiv:2611. p. 017276v1 [cs. p. 0SE] 12 Nov 2026
--- Page 3 ---
Single-Responsibility Steps
Context. A pipeline workflow uses custom workflow definition maintained and authored by a specific team. p. 1 Problem. A step may be the most granular part of a workflow. p. 1 Thus, encompassing unique name, failure point, retry mechanism, caching and reporting mechanisms. p. 1 A step that performs multiple actions report a single result while a workflow with split steps solve this it carries its own declaration and setup cost. p. 1 How can we determine the work a step should do? p. 1 [6]. Forces. – Diagnostic simplicity vs Orchestration complexity — It is imperative that failures are immediately apparent and straightforward to find, thus encouraging the division of the workflow into single-responsibility steps; However the addition of further jobs and steps with their own declaration can make this decomposition that make failures easily found make the workflow progressively hard to read and change. p. 1 – Step isolation vs State continuity — It is imperative that the steps are executed in an independent manner, thus ensuring that a potentially unreliable step does not compromise the integrity of the whole workflow. p. 1 However, independent steps remove the implicit shared state of a single script. p. 1 Thus, every data that needs to be shared across steps must be passed explicitly. p. 1 Solution. Try to make each step in a workflow as simple and self evident as possible by limiting the number of commands it executes to the essentials, as well as naming the step if necessary [8, 5, 6]. p. 1 Consequences. ⊕ Clear and simple steps makes easier to understand the CI/CD workflow. p. 1 ⊕ By breaking pipeline tasks down into specific steps, a pipeline failure is transformed into easy locatable steps. p. 1 ⊖ Breaking a pipeline into small specific steps can result into spread configurations which can decrease the overall pipeline execution time. p. 1 Related patterns. Fail Fast make this Pattern worthwhile. p. 1 Creating single-responsibility steps improves how can maintainers control how the pipeline behave, combining this with Fail Fast skips the downstream steps after a failure. p. 1
--- Page 4 ---
Workflow Component Template
Context. Multiple similar jobs with only partially varying implementations. p. 2 Problem. A maintainer create a job/step to a set of actions for a service, then copies it for another service, and so on. p. 2 Later something need to change across all service in that job/step, meaning that every job/step created for each service need to be updated. p. 2 Fully defining each implementation of similar jobs will result in unnecessary repeated code. p. 2 This is because: Each job shares identical logic. p. 2 This logic has to be defined for each full implementation of the job. p. 2 Forces. – One place to edit vs Readability — Maintaining a single definition is better when logic is shared shared. p. 3 Nevertheless, reading the job can no longer show what it have run decreasing readability of that pipeline definition and execution. p. 3 – Variants vs Readability — Team want a template to cover every job that are nearly the same, but each job variant add a condition or parameter turning the template into a control flow harder to read. p. 3 – Big Bang vs Blast Radius — We want to propagate the change at once but a mistake reach the consumers as fast as propagation. p. 3 Solution. Define a template containing all the logic each implementation will share. p. 3 Implement the template in a way that allows its behavior to be adjusted by specific implementations. p. 3 Define each specific implementation so that it exclusively adjusts the behavior of relevant sections of its template. p. 3 Consequences. ⊕ Shared logic is fixed at once rather than for each implementation. p. 3 ⊕ Implementation that should behave alike can share code. p. 3 ⊕ Implement a similar service is faster. p. 3 ⊖ Fixing a step is easy but it can add defects to other implementations. p. 3 Related patterns. Single-Responsibility Steps are the pieces that can be used within templates. p. 3
--- Page 5 ---
Event-based Triggering
Context. A software project has different CI/CD workflows corresponding to different action that need to be executed depending on certain events — Pull Requests, commits, issue activities, tag, and many others — These events happen at unpredictable times nor their frequency is known in advance. p. 3 Problem. There’s no suitable fixed schedule for unplanned events. p. 3 Scheduled workflow runs either wastes resources or leaves events unprocessed. p. 3 Relying on developers to manually trigger workflows means execution depends on memory and availability. p. 3 How can the appropriate workflow be started promptly and reliably every time an event occurs? p. 3 [14, 12, 3]. Forces. – Feedback Speed vs Resource Consumption — The sooner the developer has feedback the better for developer act promptly. p. 3 However, every run uses computational resources and pipeline can be triggered faster than they complete. p. 3 – Automation vs Control — Events that trigger specific workflows guarantee that no manual execution is required, but it also remove the ability to choose when a particular change don’t need to trigger a workflow. p. 3 – Trigger granularity vs Configuration Simplicity — The granularity of the events that trigger a workflow avoid unnecessary executions, however each aditional eventbased condition added to the workflow configuration file make it hard to understand. p. 3 Solution. Adjust your CI/CD so that certain workflows are subscribed to specific events. p. 4 Whenever a matching event to a workflow occurs, that workflow is triggered [3, 5]. p. 4 Consequences. ⊕ Feedback arrive fast for the developer to act promptly. p. 4 ⊕ Trigger is no longer human dependent for the day-to-day activities. p. 4 ⊖ Workflow runs become unpredictable, therefore infrastructure need to provide capacity for peaks that might occur. p. 4 ⊖ The number of executions that an event trigger cannot be controlled, therefore it can generate computational waste, unless interruption mechanisms are implemented. p. 4 Related patterns. Interrupt Outdated Pipeline Runs is complementary to this pattern in order to solve one of its disadvantages, the number of executions that an event trigger. p. 4 Scheduled-Triggering has can cover specific workflow runs that this pattern cannot serve and Manual Triggering where it can keep the human able to trigger when automatic is not desirable. p. 4
--- Page 8 ---
Manual Triggering
Context. A software system implementing workflows that need only to be triggered sporadically and ad hoc. p. 4 Problem. Some workflows need only to be run at irregular intervals. p. 4 Sometimes the triggering conditions of these workflows cannot be defined programmatically. p. 4 How should such workflows be triggered? p. 3 [14, 13, 5, 4, 1]. Forces. – Flexibility vs Reproducibility — Human control of the workflow parameters and execution time make the workflow serve different proposes and fit a lot of situations, however make every run potentially different. p. 4 Solution. Adjust your CI/CD infrastructure so that certain workflows are triggered manually. p. 4 Consequences. ⊕ Gives a deliberate control over a workflow. p. 4 ⊕ Resource consumption is not unpredictable. p. 4 ⊖ Workflow execution depend on a human. p. 4 Related patterns. This pattern cover the cases Event-Based Triggering and Scheduled Triggering cannot cover. p. 4 It can act as the vehicle to manual rollback which implements the Rollback Strategy. p. 4
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Aborting pipelines after failure to reduce time and resources should be designed so that
other dependent parts are not executed and automatically fail instead
to preventwasted time and resource in the dependent steps.
-
Implement Single-Responsibility Steps to make each step
as simple and self evident as possible by limiting the number of commands it executes to the essentials, as well as naming the step if necessary,
which makes a pipeline failuretransformed into easy locatable steps.
-
Design concurrency groups derived from branches or pull request developers so that when a new run starts, previous runs based on
now-outdated input are stopped
to ensureA developer receives a single result rather than multiple results from the different commits.
-
Define a template containing shared logic for similar jobs to ensure that
Shared logic is fixed at once rather than for each implementation,
which allows similar services to be implemented faster. -
Adjust CI/CD so that workflows are
subscribed to specific events
instead of relying on fixed schedules, allowing feedback to arrive fast for the developer and removing reliance on manual triggering for day-to-day activities. -
Implement a mechanism to order job execution so that
jobs that failed during previous executions of a pipeline are run earlier in the pipeline whenever possible,
which aims toReduce resource consumption
by minimizing re-running jobs that have already failed. -
Validate, filter, and sanitize external input before processing it to ensure
no potentially harmful data is used by the workflow,
thereby reducing the risk of external input compromises and improving overall reliability. -
Structure software systems with easy rollback capabilities so that they can be
restored to an earlier version and subsequently distributed to its users,
which increases release confidence and reduces deployment failures. -
Design pipelines to harness hardware potential by
parallelizing its execution
when steps are independent, aiming toReduce the execution time
while enhancing resource utilization. -
Only run tests whose results are affected by code changes rather than running all tests, which allows CI/CD to consume less resources and makes failure diagnosis easier to detect.
Related papers
- ArkEval: Benchmarking and Evaluating Automated CodeRepair for ArkTS
- TestPrism: Rethinking Test Evaluation Beyond a Single Reference
- Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agents
- Falsification-Based Verification of LLM-Generated Optimization Models: Sound Test Batteries and Their Detection Limits
- GitSkills: A Dataset of Agent Skills on GitHub
- For Coding Agents, the Repository Matters