The previous chapters covered how to deploy a Jenkins cluster on multiple cloud providers by using automation tools: HashiCorp Packer and Terraform. In this chapter, we will define a continuous integration (CI) pipeline for Dockerized microservices.
In chapter 1, you learned that CI is continuously testing and building all changes of the source code before integrating them into the central repository. Figure 7.1 summarizes the stages in this workflow.
Every change to the source code triggers the CI pipeline, which launches the automated tests. This comes with many benefits:
- Detecting bugs and issues earlier, which results in a dramatic decrease in maintenance time and costs
- Ensuring that the codebase continues to work and meets the spec requirements as the system grows
- Improving team velocity by establishing a fast-feedback loop
While automated tests come with multiple benefits, they’re extremely time-consuming to implement and execute. Therefore, we will use a testing framework based on the target service runtime and requirements.