Interview Prep/CI/CD/Deployment Strategies and GitOps

How does a CI pipeline hand off to GitOps?

IntermediateConceptDeployment Strategies and GitOps
Answer

CI builds, tests and pushes the image, then updates the deployment repo (separate from the app repo) with the new tag via a commit or PR (using kustomize edit set image, yq, or Flux/Argo Image Updater). The GitOps controller sees the change and deploys. Production promotion is a PR from the staging overlay to the prod overlay, reviewed and merged.

cd deploy-config/apps/shop-api/overlays/staging
kustomize edit set image shop-api=registry.example.com/shop/api:${GIT_SHA}
git commit -am "shop-api: staging -> ${GIT_SHA}" && git push
All CI/CD questions Roadmap: CI/CD fundamentals

More on Deployment Strategies and GitOps