I'm working out a CI/CD workflow for microservices and wondering how to promote builds without losing track of what was tested. How do you handle image tags, Helm values, deployment approvals, and rollouts?
How do you tag and promote microservice images through QA, staging, and production?
Answers
Build once on merge, tag the image with the commit SHA, and push it to the registry. Then promote that exact image through QA, staging, and production rather than rebuilding it for each environment.
For a GitOps setup, the build pipeline can open a change against an environment configuration repo. Put the image digest in the Helm values so a moved or overwritten tag can't silently change what gets deployed. Argo CD watches that repo and syncs the approved change. A production promotion can be a reviewed merge, with the same digest that passed earlier testing.
Reply to this answer
GitOps isn't mandatory. A pipeline can build and push the image, then run deployment jobs that fetch the appropriate Helm chart and deploy it. Version tags can combine a release number with a build number or commit SHA so they're useful to humans as well as traceable.
That can be a simpler fit if deployment jobs already have the necessary approvals and access controls. Moving to Argo CD later is a workflow change, not just a tool swap.
Reply to this answer
Another option is to produce the image and a packaged Helm chart together in the build, using the generated image version as the chart's app version. That gives you a pair of artifacts to track when promoting a release.
It's still worth checking what the chart actually deploys. A matching app version is useful metadata, but the image reference in the chart or its values is what determines the deployed image.
Reply to this answer
Not every workflow promotes the same image. One alternative uses commit-based tags during development, then semantic versions for later environments, with promotion handled through changes to GitOps configuration. That may fit an existing release process, but it means the exact production image might not be the one tested in QA.
If the goal is to know precisely what passed testing, keeping the same image across environments makes that easier to verify.
Reply to this answer
For rollouts, start with the normal Kubernetes Deployment strategy if that meets the service's needs. You don't need a separate rollout controller just because you're using Argo CD. Canary or blue-green tooling is a separate choice from how you build, tag, and promote the image.
Reply to this answer
Add your answer
Answers are reviewed before publication.
t.630+Orbi:
Does that require the application code and Helm charts to live in separate repos?
9w~Cevrik.28:
No. A separate config repo is one option, but the key part is that each environment's desired image is recorded and reviewed somewhere Argo CD can watch.