Continuous integration continuous deployment workflow reference

Overview

This reference helps contributors and developers understand and support the release workflow.

SellsyK8s ProductionK8s StagingGitlabApplicationsDevelopersSellsyK8s ProductionK8s StagingGitlabApplicationsDevelopersbreak[Semantic Release]Merge ReleaseBuild Container ImageWatch Container Image TagWatch Container Image TagUpdate image tagsGenerate workers configurationGenerate tagWatch git tagsReconcile tag configurationRelease jobUpdate sellsy tagReconcile tag configurationRollback jobUpdate sellsy tagReconcile tag configuration

Steps in the workflow

  1. Merge Release
    • Developers merge code changes into the release branch of the application repository.
    • Action: Trigger the release process and start the build of a new container image.
  2. Build Container Image
    • Applications trigger Gitlab to build a new container image based on the merged release branch.
    • Action: Tag and push the container image to the container registry.
  3. Watch Container Image Tag
    • K8s Staging and K8s Production environments check the container image tag for changes.
    • Action: Trigger the update process when a new image appears.
  4. Update Image Tags in Staging
    • K8s Staging notifies Sellsy to update the image tags in its configuration.
    • Action: Upgrade container tag for staging environment.
  5. Semantic Release
    • Gitlab interacts with Sellsy to generate the workers’ configuration and create a new release tag.
    • Action: Upgrade container topology into Sellsy repository.
  6. Watch Git Tags
    • K8s Staging monitors the Git tags generated by Sellsy.
    • Action: Update the staging environment’s configuration based on the new tags.
  7. Reconcile Tag Configuration in Staging
    • K8s Staging reconciles its configuration to align with the latest tags.
    • Action: Update the staging environment configuration to the latest version.
  8. Release Job
    • Developers trigger a release job in Gitlab.
    • Action: Propagate the changes to the production environment.
  9. Update Sellsy Tag in Production
    • Gitlab updates the Sellsy tag in the K8s Production environment.
    • Action: Upgrade the container for production environment.
  10. Reconcile Tag Configuration in Production
    • K8s Production reconciles its configuration to align with the latest Sellsy tags.
    • Action: Upgrade containers in production environment.
  11. Rollback Job (if needed)
    • Developers can trigger a rollback job in Gitlab if necessary.
    • Action: Revert changes in the K8s Production environment to an earlier state.