Recent Posts
Archives

Posts Tagged ‘Pipeline’

PostHeaderIcon [VoxxedDaysAmsterdam2026] Pipeline Patterns and Antipatterns: Optimizing CI/CD for Developer Productivity and Sustainability

Lecturer
Daniel Raniz Raneland (often referred to as Ron in presentations) is a programmer, architect, speaker, and coach at Factor10, a small Swedish consultancy. Since 2010 he has worked with system and software architecture across multiple companies, focusing on practical problem-solving and knowledge sharing.

Abstract
In this session from Voxxed Days Amsterdam 2026, Daniel Raniz Raneland examines common antipatterns in CI/CD pipelines that cause frustration, wasted time, and unnecessary environmental impact. Drawing from extensive consulting experience fixing suboptimal pipelines, he identifies rituals of over-execution, artifact hoarding, illogical ordering, monolithic workflows, excessive wrapper tasks, over-engineered pipeline code, lack of caching, resource collisions, and underpowered agents. For each, he proposes concrete patterns—conditional workflows, practical ordering, parallelism with artifacts, composable libraries, scripting, intelligent caching, and proper agent sizing—that shorten feedback loops, reduce boredom and retry cycles, boost productivity, and contribute to sustainability by lowering compute and storage demands. Live examples, primarily using GitHub Actions, make the advice immediately applicable across pipeline platforms.

Understanding the Human and Business Cost of Poor Pipelines

Pipelines have become central to modern development, yet poorly designed ones generate significant pain. Frequent failures fixed only by retries, long wait times (10 minutes to multiple hours or even days), and context-switching erode developer happiness and output. A four-hour pull-request pipeline limits merges to roughly one per day; multi-day runs restrict changes to a couple per week. These issues also carry environmental costs through wasted processor time, storage, and carbon emissions.

Daniel’s goal is pragmatic: reduce frustration and boredom while improving bottom lines and sustainability. His advice applies universally, independent of specific platforms like GitHub Actions, Azure DevOps, GitLab, or Jenkins.

Key Antipatterns and Corresponding Patterns

The Ritual (Doing Everything All the Time): A single workflow runs full linting, testing, integration tests, and artifact publishing on every pull request, merge to main, and nightly. This wastes resources on redundant work (e.g., publishing nightly artifacts identical to the last main build).

Pattern – Right Workflow for the Job or Conditional Workflows: Separate or conditionally skip steps based on trigger (PR vs. merge vs. nightly) or changed paths. For instance, skip publishing on PRs, skip linting on merges (where failures are usually compilation or test-related), and run only integration tests nightly.

Hoarding Artifacts: Retaining every Docker image or binary indefinitely, leading to storage bloat, discovery difficulties (paging through thousands of entries), and unnecessary costs.

Pattern: Implement cleanup policies; retain only recent or tagged releases.

Natural vs. Practical Ordering: Sequential pipelines following the testing pyramid (lint → compile → unit → integration → end-to-end) delay feedback on likely failure points (integration/end-to-end) until after confident early steps.

Pattern – Logical/Practical Order: Run failure-prone steps (integration tests) as early as possible after necessary compilation, deferring near-certain successes (unit tests, linting) to the end. This shortens time-to-signal on errors without increasing total runtime.

One Pipeline to Rule Them All: A monolithic workflow executing backend, frontend, and integration sequentially, taking ~25 minutes in the example.

Pattern – Parallelization with Artifacts: Split into independent workflows (backend, frontend, integration) running concurrently. Publish compiled artifacts for downstream consumption, reducing total wall-clock time significantly (from 25 to ~12 minutes in the demonstrated case) while managing trade-offs in total compute via careful artifact use.

Gift Wrapping: Over-reliance on wrapper actions or tasks (e.g., “run cargo” or “setup Python” actions that hide arguments or add magic).

Pattern: Use setup tasks where appropriate but invoke binaries directly for full control and clarity. Avoid execution wrappers that obscure behavior.

Complicated Pipeline as Software Project: Treating pipelines as large, platform-specific codebases (e.g., thousands of lines of Groovy in Jenkins) that are hard to test locally or migrate.

Pattern – Composable Pipeline Libraries: Extract reusable steps or workflows; compose pipelines from small, testable pieces. For standardization across projects, provide opinionated templates while allowing overrides.

Entanglement: Excessive platform-specific code locking teams into one system.

Pattern – Scripting: Offload core logic to platform-agnostic tools like Make, Just, or Task. The pipeline calls make ci, which runs the same checks locally as in CI, easing development and migration.

Groundhog Day (Starting from Scratch): Ephemeral builders reinstall everything, fetch all dependencies, and recompile fully each time, contrasting with persistent local development.

Pattern – Intelligent Caching: Cache dependencies (modest gains) but especially build outputs and artifacts. For Gradle or incrementally compiled languages, restore prior build state to achieve massive speedups (e.g., reducing compilation from minutes to seconds). Container build caching (Buildx or Podman) reuses layers across runs. Tooling images built on main further accelerate subsequent jobs.

Interference: Parallel pipelines colliding on shared resources (e.g., “latest” Docker tags or fixed database names).

Pattern: Use unique identifiers (such as commit SHA) for resources; prefer test containers where possible.

Overloaded/Underpowered Agents: Running heavy pipelines on insufficient hardware (e.g., Raspberry Pis), causing slow builds or failures.

Pattern – Right-Sizing: Monitor build times versus developer machines, resource exhaustion, and queue times. Beef up agents or roll your own when cloud options lack granularity. Human time usually outweighs server costs.

Demonstrated Impact and Final Reflections

Through gradual improvements at a customer, Daniel shows pipelines reduced from 60+ minutes (with frequent flakes and retries) to 8–12 minutes with rare non-genuine failures. Shorter cycles minimize context switching—developers can review others’ work while waiting—enhancing overall flow.

The talk equips practitioners with actionable steps to audit and refine their pipelines, emphasizing that great pipelines fade into the background while poor ones constantly annoy. By avoiding the listed antipatterns and adopting the corresponding patterns, teams achieve faster feedback, happier developers, better business outcomes, and a smaller environmental footprint.

Code Sample: Conditional Job in GitHub Actions

jobs:
  pre:
    runs-on: ubuntu-latest
    outputs:
      backend: ${{ steps.filter.outputs.backend }}
    steps:
      - uses: dorny/paths-filter@v3
        id: filter
        with:
          filters: |
            backend:
              - 'backend/**'

  backend-lint:
    needs: pre
    if: needs.pre.outputs.backend == 'true'
    runs-on: ubuntu-latest
    steps:
      - run: ./gradlew backend:lint

Code Sample: Caching Build Output Concept

- uses: actions/cache@v4
  with:
    path: ~/.gradle/caches
    key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
    restore-keys: ${{ runner.os }}-gradle-

Such configurations, combined with strategic ordering and parallelism, dramatically improve pipeline performance.

Daniel Raniz Raneland’s analysis offers a clear-eyed, experience-based guide to CI/CD excellence. By treating pipelines as first-class citizens worthy of deliberate design, organizations can transform a source of irritation into a silent enabler of rapid, reliable delivery.

Links: