Skip to main content
coding advanced

Create a Complete CI/CD Pipeline

Generate complete CI/CD pipeline configurations for any tech stack. Includes deployment scripts, testing stages, and best practices.

Works with: chatgptclaudegemini

Prompt Template

You are a Senior DevOps Engineer tasked with designing a comprehensive CI/CD pipeline. Create a complete pipeline configuration for the following requirements: **Project Details:** - Technology Stack: [TECH_STACK] - Repository Platform: [REPO_PLATFORM] - Target Environment: [TARGET_ENVIRONMENT] - Team Size: [TEAM_SIZE] **Pipeline Requirements:** 1. **Source Control Integration**: Set up automated triggers for code changes 2. **Build Stage**: Include dependency installation, compilation, and artifact creation 3. **Testing Stages**: Implement unit tests, integration tests, and security scans 4. **Quality Gates**: Define code coverage thresholds and quality metrics 5. **Deployment Strategy**: Configure [DEPLOYMENT_STRATEGY] deployment 6. **Monitoring**: Include health checks and rollback mechanisms **Deliverables Required:** - Complete pipeline configuration file - Environment-specific deployment scripts - Testing strategy and test execution commands - Security scanning integration - Notification and alerting setup - Documentation for pipeline maintenance **Additional Considerations:** - Follow industry best practices for the specified technology stack - Implement proper secret management - Include staging and production environment separation - Optimize for build speed and reliability - Consider compliance requirements if applicable Provide the complete implementation with explanatory comments and setup instructions.

Variables to Customize

[TECH_STACK]

The technology stack of your project

Example: Node.js with React frontend, PostgreSQL database

[REPO_PLATFORM]

Your repository and CI/CD platform

Example: GitHub with GitHub Actions

[TARGET_ENVIRONMENT]

Where you're deploying your application

Example: AWS ECS with load balancer

[TEAM_SIZE]

Number of developers on your team

Example: 5-10 developers

[DEPLOYMENT_STRATEGY]

Your preferred deployment approach

Example: blue-green

Example Output

# GitHub Actions CI/CD Pipeline for Node.js/React Application ```yaml name: CI/CD Pipeline on: push: branches: [main, develop] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '18' cache: 'npm' - name: Install dependencies run: | npm ci cd frontend && npm ci - name: Run tests run: | npm test -- --coverage cd frontend && npm test -- --coverage - name: Security scan run: npm audit --audit-level=high - name: Build application run: | npm run build cd frontend && npm run build deploy: needs: test runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: - name: Deploy to AWS ECS run: | aws ecs update-service --cluster prod --service myapp --force-new-deployment ``` **Deployment Scripts:** - Blue-green deployment with health checks - Automatic rollback on failure - Environment variable management - Database migration handling **Quality Gates:** - Minimum 80% code coverage - No high-severity security vulnerabilities - All tests must pass

Pro Tips for Best Results

  • Start with a basic pipeline and gradually add complexity - don't try to implement everything at once
  • Always include rollback mechanisms and health checks in your deployment stages
  • Use environment-specific configuration files to manage different deployment targets
  • Implement proper secret management using your platform's built-in tools (GitHub Secrets, AWS Parameter Store, etc.)
  • Monitor pipeline performance and optimize build times by caching dependencies and using parallel jobs where possible

Tags

Want 500+ Expert Prompts?

Get the Premium Prompt Pack — organized, tested, and ready to use.

Get it for $29

Related Prompts You Might Like