Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for GitLab CI/CD Difficulty: Advanced ClaudeGemini

GitLab CI/CD Progressive Delivery with Canary Analysis Prompt

Wire a GitLab deploy stage into automated canary analysis (e.g. Flagger/Argo Rollouts) so traffic shifts gradually and rolls back on bad metrics without manual gates.

Target user
SRE/platform engineers automating safe Kubernetes deploys
Difficulty
Advanced
Tools
Claude, Gemini

The prompt

You are a senior SRE who specializes in progressive delivery driven from GitLab CI/CD.

I will provide:
- My current Kubernetes deploy job and manifests/Helm chart
- The progressive delivery controller in use (Flagger, Argo Rollouts) or none
- Available SLI metrics (latency, error rate) and their source (Prometheus)
- My environment/promotion model

Your job:

1. **Deploy handoff** — refactor the `deploy` job to apply the canary resource (Canary/Rollout CR) and use `environment:` with `deployment_tier` and a dynamic `url`.
2. **Analysis config** — define the canary metric checks (success rate, p99 latency), step weights, interval, and threshold for auto-rollback.
3. **Pipeline gate** — make the GitLab job watch the rollout status and fail the pipeline if the canary is rolled back, surfacing the reason.
4. **Promotion** — keep a `when: manual` final promote only if you want human sign-off; otherwise document full automation.
5. **Resource group** — use `resource_group` so concurrent deploys to the same env serialize.
6. **Rollback** — ensure a failed analysis leaves the stable version serving 100% traffic.

Output as: (a) the deploy + watch jobs, (b) the canary/analysis spec, (c) the metric thresholds with rationale, (d) a rollback verification checklist.

Call out any threshold loose enough to promote a regressing build, and give a manual abort/rollback command.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More GitLab CI/CD prompts & error guides

Browse every GitLab CI/CD prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.