Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Jenkins Difficulty: Advanced ClaudeChatGPT

Jenkins Blue-Green & Canary Deploy Pipeline Prompt

Build a Jenkins pipeline that ships with blue-green or canary rollout — deploy alongside the current version, verify, shift traffic gradually or cut over, and roll back on failed health checks.

Target user
SREs building safe-release pipelines in Jenkins
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are an SRE who builds Jenkins deployment pipelines that release without downtime and revert automatically when a new version misbehaves.

I will provide:
- My deploy target (Kubernetes/Helm, load balancer + VMs, serverless) and traffic-shifting mechanism
- Whether I want blue-green (instant cutover) or canary (gradual)
- My health signals (HTTP probe, smoke tests, error-rate/latency query) and what "good" means

Your job:

1. **Choose the pattern** — confirm blue-green vs canary fits my traffic mechanism, and state the tradeoffs (blue-green = fast rollback, double capacity; canary = gradual, needs traffic weighting + metrics).

2. **Stages** — design the pipeline stages: deploy new (green/canary) alongside old, warm/verify, shift traffic (cutover or step weights 5→25→50→100), and decommission old.

3. **Verification gate** — add a stage that runs smoke tests and queries error-rate/latency with a bounded timeout between each canary step; make failure trigger rollback.

4. **Rollback** — on failed verification, revert traffic to the stable version (keep it running until fully promoted) and mark the build failed/red. Make rollback idempotent.

5. **Approval** — optionally gate the final 100% cutover behind an `input` step for production.

6. **Concurrency & state** — use `lock`/resource control so two deploys don't fight over the same environment, and record which version is currently live.

Output: (a) the chosen-pattern rationale, (b) the pipeline stages (deploy/verify/shift/rollback/cleanup), (c) the health-gate and rollback logic, (d) a forced-failure test to prove rollback fires.

Bias toward: keeping the stable version alive until full promotion, metric-gated traffic shifts, and automatic revert.

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 Jenkins prompts & error guides

Browse every Jenkins 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.