Reusable Workflows: Pipeline DRY Done Right

Pipeline duplication compounds across repos. Reusable workflows fix it without trading flexibility.

Why duplicate pipelines hurt

Per-repo pipelines drift over time. Security checks, quality gates, deployment steps diverge silently; the cost shows up as compliance findings or incidents.

Reusable patterns

Versioning shared workflows

Shared workflows need explicit versioning. Pinning to tags lets consumers update on their own schedule; pinning to main ships surprises.

When to NOT reuse

Reuse is not free. Forcing every pipeline into the shared template produces workarounds that are worse than duplication.

Antipatterns

What to do this week

Three moves. (1) Apply this to one pipeline first. (2) Measure deploy frequency / MTTR before/after. (3) Document the outcome so the next team starts from data.