Hello,
I have a question regarding the GitOps model. Imagine we have a monorepo, which means that all the source code for our application, infrastructure, and configuration related to a single project/application is maintained within the same repository.
Now, my goal is to apply Infrastructure as Code (IaC) using a pull-based mechanism. However, before moving the code to production, we have several intermediate environments, such as DEV, QA, Staging, and Production.
So, my question is, after the code is merged into the "main" branch, how can we ensure that it smoothly progresses from one environment to another after undergoing proper testing? We don't want to deploy to all the environments simultaneously; instead, we prefer a controlled, sequential flow.
One possible approach is to create different branches for each environment, but I'm concerned that this might overly complicate branch management within Git. I would greatly appreciate your insights on how to achieve this use case more effectively.