CI / CD
The Continuous Integration (CI) and Continuous Deployment (CD) processes are essential parts of a DevOps software development lifecycle.
During the CI process, the code is automatically built, tested, and analyzed every time a developer pushes code to the repository. This process helps to catch bugs early in the development cycle and ensures that the codebase is always in a deployable state.
The project uses GitHub Actions to realize a CI/CD process. GitHub Actions is a powerful tool that allows automating the software development workflow directly in the GitHub repository.
CI / CD Action
The file .github/workflows/ci-cd.yml
contains the configuration for the entire CI/CD process. This action performs build, test, release, delivery and deployment tasks.
Here a conceptual overview of the CI/CD process (arrow means depends on):
Build
The build job compiles the source code and run all checks. This part allows to stop the process instead of spawning multiple matrix jobs for testing.
Intensive Tests
The tests job runs all the tests already run before, but with a different configuration. It uses a matrix strategy to run the tests in parallel.
Note: Given the fact project uses testcontainers they could not be run on MacOS or Windows runners.
Release
The release job is the one responsible for determining if the code should be released. Using semantic release task, it will compute the next version (if needed), create a new tag, and push it to the repository. It also pushes coverage reports to codecov.io.
It will run only if the branch is main
. If the semantic release task determines that a new version should not be released, the CI process will stop here.
Pages Deploy
The pages deploy job is responsible for deploying docs, Kotlin docs, OpenApi documentation, etc. to GitHub Pages.
The site is available here: GitHub Pages
Image Deliver
The image deliver job is responsible for building and pushing the Docker images to the Dockerhub.
This job is executed with a matrix strategy to build and push multiple images in parallel.
Images are built using QEMU in order to target multiple architectures (linux/amd64, linux/arm64).
Here the container registry: Dockerhub
Renovate
Renovate is a tool that helps to keep dependencies up-to-date.
The project uses Renovate to automatically create pull requests to update dependencies. If possible, it will also automatically merge the pull request.
The configuration for Renovate extend from DanySK/renovate-config.