Skip to content

CI/CD Generator

Generates CI/CD pipeline configurations from templates.

Overview

The CI/CD Generator creates GitHub Actions workflows (or other CI/CD configs) based on service templates and requirements.

Features

  • Template-Based: Uses pipeline templates for consistency
  • Multi-Environment: Supports dev, staging, prod environments
  • GitHub Actions: Generates GitHub Actions workflows
  • Customizable: Allows customization of build and deploy steps

Usage

Generate Pipeline

bash
ci-cd-generator create \
  --service my-app \
  --repository github.com/org/my-app \
  --environments dev,staging,prod \
  --template standard-web-app

Pipeline Templates

Standard Web App

  • Build: Docker build and push
  • Test: Unit and integration tests
  • Deploy: Terraform apply to target environment

Serverless API

  • Build: Package Lambda functions
  • Test: Unit tests
  • Deploy: Update Lambda functions and API Gateway

Generated Structure

yaml
# .github/workflows/deploy.yml
name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy-dev:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Deploy to dev
        run: terraform apply -auto-approve

Implementation

This would typically be:

  • Lambda function (API-triggered)
  • CLI tool (for local generation)
  • GitHub Action (for Git-based generation)

Released under the MIT License.