Tools
Tools: Developer CI Dev Stage Production
2026-02-16
0 views
admin
π· STEP 0 β First Understand the Problem ## π· ENVIRONMENT 1 β DEV ## What is DEV? ## How GitOps Works in DEV ## Who Uses DEV? ## π· ENVIRONMENT 2 β STAGE ## What is STAGE? ## How It Works ## What Happens Here? ## π· ENVIRONMENT 3 β PRODUCTION ## What is Production? ## How GitOps Works in Production ## Strategy 1 β Release Branch ## Strategy 2 β Manual Promotion ## π₯ Why This Is Important ## π· Real GitOps Multi-Env Structure ## π· Deployment Flow Explained for Beginners ## Step 1 β Developer pushes code ## Step 2 β Jenkins updates values-dev.yaml ## Step 3 β Promote to Stage ## Step 4 β Promote to Production ## π₯ Key DevOps Principle ## π· Interview-Level Explanation If we deploy directly to production: So DevOps creates safe layers. Think of it like a hospital: You donβt send a medicine directly to patients. This environment is allowed to break. When Jenkins updates image tag β
Argo CD auto deploys to DEV. Stage = rehearsal before production. It should look like production. If everything passes β ready for production. Real users.
Real traffic.
Real money. This environment must: Production deployment should NOT be automatic from main branch. Only approved code gets merged to release. You manually change image tag in: This creates audit trail. Because CI only proves: β Code compiles
β Docker builds But it does NOT prove: β Application logic works
β Database integration works
β External APIs work
β Performance is acceptable That is why environments exist. Your Helm repo could look like this: Same repo
Different values file
Different namespace Letβs imagine version 15. Now dev environment runs image 15. Argo CD deploys to stage. Users see new version. We do not rebuild image for each environment. We promote the SAME image. Very important concept. Why separate environments? Because CI validates build integrity, but environments validate runtime behavior progressively to reduce production risk. Dev = kitchen test
Stage = restaurant rehearsal
Prod = customers eating You never experiment directly with customers. Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse CODE_BLOCK:
Developer pushes β users see bugs Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Developer pushes β users see bugs CODE_BLOCK:
Developer pushes β users see bugs CODE_BLOCK:
manual-app-helm/ values-dev.yaml Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
manual-app-helm/ values-dev.yaml CODE_BLOCK:
manual-app-helm/ values-dev.yaml CODE_BLOCK:
manual-app-dev Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
manual-app-dev CODE_BLOCK:
manual-app-dev CODE_BLOCK:
values-stage.yaml Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
values-stage.yaml CODE_BLOCK:
values-stage.yaml CODE_BLOCK:
manual-app-stage Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
manual-app-stage CODE_BLOCK:
manual-app-stage CODE_BLOCK:
main β dev
release β stage
tag v1.0 β production Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
main β dev
release β stage
tag v1.0 β production CODE_BLOCK:
main β dev
release β stage
tag v1.0 β production CODE_BLOCK:
values-prod.yaml Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
values-prod.yaml CODE_BLOCK:
values-prod.yaml CODE_BLOCK:
manual-app-helm/ charts/ values-dev.yaml values-stage.yaml values-prod.yaml Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
manual-app-helm/ charts/ values-dev.yaml values-stage.yaml values-prod.yaml CODE_BLOCK:
manual-app-helm/ charts/ values-dev.yaml values-stage.yaml values-prod.yaml CODE_BLOCK:
manual-app-dev
manual-app-stage
manual-app-prod Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
manual-app-dev
manual-app-stage
manual-app-prod CODE_BLOCK:
manual-app-dev
manual-app-stage
manual-app-prod CODE_BLOCK:
namespace: dev
namespace: stage
namespace: prod Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
namespace: dev
namespace: stage
namespace: prod CODE_BLOCK:
namespace: dev
namespace: stage
namespace: prod COMMAND_BLOCK:
docker build
docker push Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK:
docker build
docker push COMMAND_BLOCK:
docker build
docker push CODE_BLOCK:
values-stage.yaml β tag 15 Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
values-stage.yaml β tag 15 CODE_BLOCK:
values-stage.yaml β tag 15 CODE_BLOCK:
values-prod.yaml β tag 15 Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
values-prod.yaml β tag 15 CODE_BLOCK:
values-prod.yaml β tag 15 CODE_BLOCK:
What was tested = what goes to production Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
What was tested = what goes to production CODE_BLOCK:
What was tested = what goes to production - Why each exists
- What happens in each
- Who is responsible
- How Argo CD handles it - Test if image builds
- Test if container runs
- Test if Helm works
- Test if service reachable - branch: main
- values-dev.yaml - Does app start?
- Is port correct? - branch: release
OR
- same branch but different values file - QA team tests
- Integration tests
- Performance tests
- Security scans - Be approved
how-totutorialguidedev.toaimldockerdatabasegit