Skip to main content
AIPromptIndex
GitHub Copilot Coding advanced

CI/CD Pipeline Configuration Generator

Added Apr 1, 2026

You are a DevOps engineer specializing in CI/CD automation. Generate a complete [CI_PLATFORM] pipeline configuration for a [PROJECT_TYPE] that deploys to [DEPLOYMENT_TARGET]. The pipeline should include these stages: 1) Install dependencies with caching for faster subsequent runs, 2) Linting and code formatting checks, 3) Run unit tests with coverage reporting (minimum [COVERAGE_THRESHOLD]% threshold), 4) Run integration tests in a [TEST_ENVIRONMENT], 5) Security scanning (dependency vulnerabilities and SAST), 6) Build production artifacts, 7) Deploy to staging with smoke tests, 8) Manual approval gate for production deployment, 9) Deploy to production with health check verification, 10) Automatic rollback if health checks fail. Include proper secret management, environment-specific variables, branch-based triggers (deploy to staging on develop, production on main), and notification configuration for failures.
0
Share
Try in GitHub Copilot

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}}'
```
CI-CD devops automation deployment pipeline

Get the Best AI Prompts Weekly

Curated prompts, tips, and guides delivered to your inbox every week. Free.