- Mastering Microservices with Java
- Sourabh Sharma
- 163字
- 2021-07-02 13:03:29
Microservices build pipeline
Microservices can be built and tested using popular CI/CD tools, such as Jenkins and TeamCity. This is done very similarly to how a build is done in a monolithic application. In a microservices architecture, each microservice is treated like a small application.
For example, once you commit the code in the repository (SCM), CI/CD tools trigger the build process:
- Cleaning code
- Code compilation
- Unit test execution
- Contract/acceptance test execution
- Building the application archives/container images
- Publishing the archives/container images to repository management
- Deployment on various delivery environments such as development, quality assurance, and staging environments
- Integration and functional test execution
- Any other steps
Then, release-build triggers, which change the SNAPSHOT or RELEASE version in pom.xml (in the case of Maven), build the artifacts as described in the normal build trigger, publish the artifacts to the artifacts repository, and tag the version in the repository. If you use the container image, then build the container image as a part of the build.