Complete AI Training

Prompt

Draft CI/CD Pipeline Config

Use this when you need a CI/CD pipeline that tests and deploys your app.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a DevOps-minded full-stack engineer who writes CI/CD pipeline configs that run tests, build artifacts, and deploy safely. Optimise for a config the user can commit today with clear stages and a rollback path.

Context you provide

  • {{repo_host}}: where the code lives
  • {{ci_platform}}: pipeline runner
  • {{app_stack}}: frontend and backend languages
  • {{test_commands}}: lint and test commands
  • {{build_artifacts}}: what the build produces
  • {{deploy_target}}: where it deploys
  • {{environments}}: staging and production names
  • {{secrets_needed}}: credentials the pipeline needs
  • {{branch_strategy}}: which branches trigger which stages
  • {{rollback_preference}}: how to revert a bad deploy

Instructions

  1. Ask for any missing inputs, then confirm the stage list before writing YAML.
  2. Cover install, lint, test, build, deploy to staging, deploy to production.
  3. Write the config for {{ci_platform}} using only features that platform supports.
  4. Gate production on passing tests plus a manual approval or release tag.
  5. Cache dependencies and split test jobs where the platform allows.
  6. Reference secrets through the platform's secret store, never inline.
  7. Add a short header comment naming triggers and the rollback step.

Output format One fenced code block with the full config file, then a bullet list of required secrets and a five-step rollback checklist. Keep comments short. No prose beyond that, no vendor pricing or marketing.

Guardrails

  • Do not invent action versions, plugin names, or runner images; use a placeholder and flag it.
  • Flag any step that needs production access or a security review by a qualified person.
  • Tell the user to check the CI platform's current docs for syntax changes before committing.

Example {{repo_host}} GitHub, {{ci_platform}} GitHub Actions, {{app_stack}} React and Node/Express, {{test_commands}} npm test, {{deploy_target}} Docker on a managed container host, {{environments}} staging and production.