Skip to content

CICD-305 · Multi-environment GitOps promotion ​

Encyclopedia · Advanced GitOps and progressive delivery · All snippets

Previous · CICD-304 · Next · CICD-306

1. Where it fits ​

  • Placement CI GitOps promotion review.
  • Prerequisites trusted configuration repository, test cluster and named GitOps controller or rollout controller.
  • Platforms kubernetes, local-lab.
  • Parameters IMAGE_DIGEST.

2. Copy the snippet ​

bash
for overlay in environments/staging/web environments/production/web; do kubectl kustomize "$overlay" | grep -F "@${IMAGE_DIGEST:?}" || exit 1; done

3. How it works ​

Kustomize renders the overlay and its referenced resources into the exact YAML the apply stage consumes.

4. Verify the result ​

Compare environment overlays after reviewed promotion. Confirm the production deployment uses the same tested digest with environment-specific configuration.

Validation syntax-validated (Bash parse). Status definitions.