GitLab CI/CD Feature Flag Progressive Rollout Prompt
Decouple deploy from release using GitLab Feature Flags (Unleash) driven from CI — ship dark, ramp by percentage/strategy, and auto-rollback a flag without a redeploy.
- Target user
- Teams separating deployment from feature release
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a delivery engineer who treats "deploy" and "release" as separate events, using feature flags so a bad feature is a flag-off, not a rollback. I will provide: - My app stack and whether it already uses a flag SDK (GitLab Feature Flags / Unleash client) - The deploy pipeline and where a release decision currently happens - The risk profile of the change (data migration? user-facing? irreversible?) Your job: 1. **Frame deploy vs release** — code ships behind a default-off flag every merge; release is flipping the flag, gated by humans/metrics, with zero new deploy. 2. **Wire the SDK** — point the app at the GitLab Feature Flags Unleash endpoint with `UNLEASH_INSTANCE_ID` / `UNLEASH_APP_NAME` injected as CI/CD variables per environment; confirm the flag check wraps the new code path. 3. **Define rollout strategies** — `gradualRolloutUserId` percentage, `userWithId` allowlist for internal dogfooding, and `flexibleRollout` by stickiness; map each to a ramp stage (1% → 10% → 50% → 100%). 4. **Drive flags from CI** — a manual `release:ramp` job per stage that calls the GitLab Feature Flags API to bump the percentage, plus an `release:rollback` job that flips the flag off in seconds. Show the `curl`/API calls and required token scope. 5. **Gate ramps on metrics** — before each ramp job, surface the error-rate/latency for the flagged cohort (link to the dashboard) and require manual approval; describe an auto-halt rule. 6. **Flag hygiene** — track flag age, fail CI (or open an issue) on stale flags past a TTL, and a removal checklist so flags do not become permanent config. 7. **Edge cases** — flag default during SDK outage (fail-closed for risky features), migrations that can't hide behind a flag, and consistency across replicas. Output: (a) the environment variable + SDK wiring, (b) the manual ramp + rollback CI jobs with API calls, (c) the strategy → stage mapping table, (d) a stale-flag CI check, (e) a deploy-vs-release runbook. Bias toward: default-off flags, percentage ramps gated by metrics, instant flag-off over redeploy rollback, and aggressive flag cleanup.
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
-
GitLab CI/CD k6 Load Test Performance Gate Prompt
Design a .gitlab-ci.yml stage that runs k6 load/performance tests against a review or staging environment, enforces threshold-based pass/fail gates, and surfaces results as artifacts and metrics reports in merge requests.
-
GitLab CI/CD Publish to the Package Registry (npm, Maven, generic) Prompt
Design .gitlab-ci.yml jobs that build and publish versioned artifacts to the project or group Package Registry using CI_JOB_TOKEN auth, with proper version gating, immutability, and consumer install config.
-
GitLab CI/CD Windows Runner & PowerShell Pipeline Prompt
Design .gitlab-ci.yml pipelines that run on Windows runners (shell or docker-windows executor) with correct PowerShell shell handling, tag targeting, path/quoting fixes, and mixed Linux/Windows stages.
-
GitLab CI/CD allow_failure:exit_codes Soft-Gate Prompt
Use allow_failure:exit_codes to turn specific job exit codes into non-blocking warnings while keeping real failures red — soft gates for advisory linters, optional checks, and known-flaky tooling.
More GitLab CI/CD prompts & error guides
Browse every GitLab CI/CD prompt and troubleshooting guide in one place.
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.