CI/CD Pipeline Configuration Generator
Added Apr 1, 2026
About This Prompt
Setting up a comprehensive CI/CD pipeline from scratch involves dozens of configuration decisions that can take days to get right. This prompt generates a complete pipeline configuration with production-grade patterns: caching for speed, security scanning for safety, coverage thresholds for quality, and automatic rollback for reliability. The manual approval gate for production deployments adds the human oversight that most teams require. The branch-based trigger configuration implements the standard Git flow deployment pattern. Use it for new projects that need CI/CD from day one or existing projects upgrading from basic build-and-deploy setups.
Variables to Customize
[CI_PLATFORM]
CI/CD platform to use
Example: GitHub Actions
[PROJECT_TYPE]
Type of project
Example: Next.js application with a PostgreSQL database
[DEPLOYMENT_TARGET]
Where the app deploys
Example: AWS ECS with Fargate
[COVERAGE_THRESHOLD]
Minimum test coverage percentage
Example: 80
[TEST_ENVIRONMENT]
How integration tests run
Example: Docker Compose with PostgreSQL and Redis containers
Tips for Best Results
- Start with a simpler pipeline and add stages incrementally rather than deploying all at once
- Monitor pipeline duration and optimize the slowest stages first
- Use branch protection rules to enforce pipeline passage before merging
Example Output
```yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
NODE_VERSION: '20'
REGISTRY: ${{ secrets.ECR_REGISTRY }}
jobs:
lint-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm test -- --coverage --coverageThreshold='{"global":{"branches":80}}'
```