Daniel Raniz Raneland

CI/CD Patterns and Antipatterns - Things your Pipeline Should (Not) Do

Is your CI pipeline a slow, frustrating ritual? Learn the patterns to eliminate flaky builds, reduce developer wait times, and ship code faster.

CI/CD Patterns and Antipatterns - Things your Pipeline Should (Not) Do
#1about 2 minutes

The hidden costs of slow and frustrating CI/CD pipelines

Slow, frustrating, and wasteful CI/CD pipelines interrupt developer flow and have a negative environmental impact.

#2about 3 minutes

Antipattern: Running the same pipeline for every trigger

The 'ritual' antipattern involves wastefully running identical, comprehensive pipelines for pull requests, merges, and nightly schedules.

#3about 3 minutes

Use conditional logic to run only necessary steps

Create context-specific pipelines for different triggers and use path filtering to run only the jobs relevant to the code that has changed.

#4about 2 minutes

Antipattern: Stop hoarding unnecessary build artifacts

The 'hoarding' antipattern wastes storage and makes navigation difficult by keeping every build artifact indefinitely instead of using automated cleanup.

#5about 2 minutes

Antipattern: Order pipeline steps for the fastest feedback

Prioritize tests that are most likely to fail, such as integration tests, to get feedback faster instead of following a conventional testing pyramid order.

#6about 3 minutes

Antipattern: Break monolithic pipelines into parallel jobs

Replace a single, long-running sequential pipeline with multiple parallel jobs for independent components like frontend and backend to significantly reduce wall-clock time.

#7about 7 minutes

Antipattern: Use caching and tooling images to avoid redundant work

Leverage caching for dependencies, build outputs, and Docker layers, and use pre-built tooling images to avoid starting from scratch on every run.

#8about 2 minutes

Antipattern: Prevent pipeline interference with unique identifiers

Avoid race conditions where concurrent pipelines overwrite shared resources like a 'latest' tag by using unique identifiers like the Git SHA for artifacts.

#9about 4 minutes

Antipattern: Properly size your build agents and runners

Ensure build agents are at least as powerful as developer machines to prevent resource-related failures, and consider self-hosted runners for full control over hardware.

#10about 1 minute

Recap of key CI/CD patterns and antipatterns

A summary of common pipeline pitfalls and the corresponding best practices for creating faster, more reliable, and efficient CI/CD workflows.

Related jobs
Jobs that call for the skills explored in this talk.

test

Milly
Vienna, Austria

Intermediate

test

Milly
Vienna, Austria

Intermediate

job ad

Saby Company
Delebio, Italy

Intermediate

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
Building AI Solutions with Rust and Docker
In recent years, artificial intelligence has surged in popularity in the world of development. While Python remains a popular choice in the realm of AI, Rust - often known as Rust Lang - is quickly emerging as a formidable alternative.Rust programmin...
Building AI Solutions with Rust and Docker
CH
Chris Heilmann
All the videos of Halfstack London 2024!
Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
All the videos of Halfstack London 2024!

From learning to earning

Jobs that call for the skills explored in this talk.