Microservice Build Pipelines
The main idea behind a microservices-based application is that systems are simpler to build and maintain when broken down into smaller pieces. Continuous integration (CI), delivery (CD), and deployment (also CD) have been advocated for years as a mindset for speeding up the integration of code changes with a “little & often” approach. This approach isn’t limited to microservices – it’s also used to deliver monolithic systems – but it is crucial in developing microservices-based applications.
Microservices are built and tested using CI/CD tools, where each microservice is treated as a small application. Once the code is committed in the repository, the CI/CD tools must trigger the build process:
- Code compilation
- Clean code verification
- Unit test execution
- Contract/acceptance test execution
- Building the application binary
- Publishing the application binary to repository management
- Building the application image if running environments is based on containers
- Publishing the application image to repository management, if
- Deployment on running environments such as development, or quality assurance
- Integration test execution
- Functional test execution
- Any other steps
The same steps are valid for continuous delivery (CD) and deployment (also CD). The particularity is the creation of the tag version in the repository.