liveBook · Manning

Deployment pipeline

As explained in Microservices Patterns, Second Edition

An automated sequence that takes a software change through building, testing, and deployment.

A deployment pipeline is an automated path that builds, tests, and deploys a software change. A fast pipeline gives developers rapid feedback and helps teams deliver small changes without long waits. Pipeline speed alone is not enough for fast flow: teams also need an architecture that lets them change their code without frequent coordination. section 3.2.4 section 1.2.1

A pipeline usually starts with a Git push, though another pipeline’s successful completion can also trigger it. It invokes a build tool to build and test components, then deploys the updated components to production after their tests pass. section 3.2.4

Choose pipeline boundaries to match deployable units:

  • A monolith has one codebase, one deployable unit, and one deployment pipeline. This can support fast flow, but the shared pipeline can become a bottleneck as the application and organization grow. section 1.2.2
  • An independently deployable service has its own pipeline and is production-ready after testing in isolation. A shared pipeline can force teams to coordinate and let one service’s failing tests block another service’s deployment. section 7.3.1

Separate service pipelines

An application with Order and Delivery services can give each service its own pipeline. If the Orders team breaks its build, the Delivery team can still deploy. Each pipeline handles a smaller codebase and relatively infrequent changes, reducing its likelihood of becoming a bottleneck. section 1.3.2

Figure 1.10 A service must be independently deployable: packaged as a deployable or executable unit, has its own deployment pipeline and is production-ready after it has been tested in isolation.
independently deployable services

The diagram ties a service’s deployable unit, dedicated pipeline, and isolated testing to independent deployability. section 1.3.1

Testing choices affect pipeline speed. Requiring whole-application end-to-end tests before every service deployment introduces slow tests that can fail randomly and require manual review. To preserve independent deployment, move those tests out of the service pipeline and test the service in isolation. section 1.3.4 section 1.3.1

Incremental builds can shorten execution by reusing previous results and building or testing only affected elements. In an ephemeral cloud pipeline, preserve those results with an additional mechanism such as a build cache. Gradle, for example, skips tasks it determines are up to date. section 3.2.4

Do not migrate to microservices solely because delivery is slow. First investigate whether a modular monolith, an automated pipeline, or changes to working practices would remove the bottleneck. Consider migration if those changes are insufficient; an incremental migration avoids delaying all value until a rewrite is complete. section 1.4.2 section 1.2.2

How Microservices Patterns, Second Edition covers it

How deep it goes
Explains triggers, build and test execution, deployment, isolation, and incremental-build caching without providing a pipeline configuration.
Examples
Illustrates separate Order and Delivery service pipelines and Gradle incremental builds with a cache for ephemeral environments.
What you can do after
Evaluate and understand pipeline boundaries and bottlenecks when choosing between a monolith and independently deployable services.
How it connects
Connects deployment pipelines to fast flow, independent deployability, monolithic architecture, microservices, and incremental builds.

Also explained in

Compare how 37 books explain deployment pipeline →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.