Release patterns
In the last section, we discussed the Jenkins pipeline patterns used to speed up the build execution (parallel steps), help with the code reuse (shared libraries), limit the risk of production bugs (rollback), and deal with manual approvals (manual steps). This section presents the next group of patterns, this time related to the release process. They are designed to reduce the risk of updating the production to a new software version.
We already described one of the release patterns, rolling updates, in Chapter 8, Clustering with Docker Swarm. Here, we present two more: blue-green deployment and canary releases.
Blue-green deployment
Blue-green deployment is a technique to reduce the downtime associated with the release. It concerns having two identical production environments, one called green, the other called blue, as presented in the following figure:

In the figure, the currently accessible environment is blue. If we want to make a new release, then we deploy everything...