A shared delivery pipeline
Result
Near-identical pipelines copied from service to service became shared templates with caching and default variables, which each project overrides only where it differs.
6–8 minbuild time per pipelineagainst 15 min before
What should have happened
A small set of templates defines how every service is built, tested and shipped, and each service only declares what sets it apart.
What actually happened
Each service carried its own pipeline, written and versioned next to the code. Over time they turned into near-identical files that drifted apart in small ways, with no caching and no owner. Standing up a new service meant copying another pipeline and tweaking it by hand.
The constraint
The services belonged to different teams and came in different kinds, and each kind had its own way of publishing. My first proposal, a single template, did not fit.
What I decided
Shared templates per pipeline type, with default variables for the most common values. Each project's pipeline only overrides what diverges from the default. The templates also reference condensed steps.
How I did it
Pipelines now come from shared templates, with multi-stage builds and caching. I also split the build agents into pools per project, so one project's pipelines stop waiting on another's.
What This Unlocked
- Each pipeline started running in less time. Whoever opens a commit waits less to learn whether it passed, and the agent is free sooner for the next one.
- Shipping a service got faster. A new service is born with its pipeline already in place, instead of copying another team's pipeline and tweaking it by hand.
- With agents in separate pools, contention for agents eased, and one project's pipelines stopped blocking another's.
- Improving the pipeline became a change to one template, instead of a change to many files.
What I gave up
It required more detailed documentation and a skill to make it easier for others to create pipelines.
What I Would Do Differently
I left the migration optional for too long. For weeks two standards ran at once, which is worse than either one alone. Today I would start with the noisiest services and migrate them without asking.