Design a platform-specific CI/CD pipeline from your repository's real commands, with build-once artifact promotion, approval gates, secrets handling and rollback.
Design a CI/CD pipeline for the application below on the named platform. Use the repository's real build and test commands, promote one tested artifact through environments, and make every gate and rollback step explicit. ## Inputs CI/CD platform: [PLATFORM] Application, language and build tool: [APPLICATION] Existing commands for install, lint, test and build: [COMMANDS] Environments and deployment target (for example Kubernetes, VM, serverless): [TARGETS] Branching and release model: [BRANCHING] Secret store and cloud authentication method: [SECRETS] Database migration approach: [MIGRATIONS] ## Instructions 1. Lay out stages and their triggers: pull request checks, main-branch build, staging deploy, production deploy. 2. Build the deployable artifact once, tag it with the commit identifier, and deploy that same artifact to every environment. 3. Run tests with the supplied commands. Publish coverage as a report; apply a threshold only if the team already enforces one. 4. Add security checks that fit the stack (dependency audit, secret scanning, image scanning) and state what each one blocks. 5. Gate production behind the platform's approval mechanism and restrict who can approve. 6. Use short-lived credentials (OIDC) where the platform and cloud support them; otherwise scope secrets per environment. 7. Define rollback: what is redeployed, how, and how schema migrations stay backward compatible so a rollback does not break the database. ## Return 1. Stage diagram with triggers and gates. 2. Pipeline configuration in the platform's syntax. 3. Table of required secrets, variables and permissions per environment. 4. Rollback runbook. 5. Items to verify on the platform before first use. ## Acceptance checks - Every command comes from [COMMANDS] or is marked as a placeholder to confirm. - Production deploys the artifact built and tested earlier, not a rebuild. - Approval and rollback steps name the platform feature used. - No pipeline run results are claimed; the configuration is unexecuted until run.
Illustrative input and expected result. This example is a verification guide, not a recorded model run.
Content reviewed .
Platform: GitLab CI/CD (gitlab.com) Application: Django 5 API, Python 3.12, uv for dependencies, Docker image Commands: uv sync --frozen; uv run ruff check; uv run pytest --cov; docker build -t app . Targets: staging and production namespaces on one Kubernetes cluster, deployed with Helm Branching: trunk-based; merge requests into main; production releases from main Secrets: GitLab CI/CD variables; cluster access via a GitLab agent for Kubernetes Migrations: Django migrations run as a Helm pre-upgrade job
A .gitlab-ci.yml with merge-request lint/test jobs, a main-branch job that builds and pushes the image tagged with $CI_COMMIT_SHA, a staging deploy using that tag, and a production deploy job with when: manual on a protected environment; coverage published as a report without an invented threshold; a rollback runbook using helm rollback plus a rule that migrations must be expand/contract so the previous release still runs; and a list of settings to confirm in GitLab (protected environment approvers, agent access). Illustrative expectation, not a recorded model run.
Ask questions or share concrete improvements.
No comments yet.
Sign in to join the discussion.
Guides for adapting and checking prompts:
Author-supplied tool and model tags; confirm behavior with your own examples.
Models