Deploy to Kubernetes cluster with KUBERNETES_DEPLOY_BRANCH condition
What does this MR do?
This change modifies the GitLab CI deployment configuration to make it more flexible. Previously, deployments to Kubernetes would only trigger when commits were made to the default branch (typically "main"). Now, deployments can also happen from a custom branch specified in the KUBERNETES_DEPLOY_BRANCH variable. This allows us to deploy from feature branches when needed, while maintaining the ability to deploy from "main" when no custom branch is specified.
gitGraph
commit id: "HEAD"
branch "feature/fault-tolerance"
checkout main
commit id: "New commit"
checkout "feature/fault-tolerance"
commit id: "Fault tolerance implementation"
checkout main
checkout "feature/fault-tolerance"
merge main id: "Rebase new commit from main"
commit id: "New commit rebased on fault tolerance"
commit id: "Deploy to Kubernetes" type: HIGHLIGHT
Why was this MR needed?
We need this so we can deploy from feature/fault-tolerance.
What's the best way to test this MR?
What are the relevant issue numbers?
Edited by Georgi N. Georgiev | GitLab