Skip to content

amandladev/python-pipeline-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Pipeline Creator CLI

A powerful CLI tool for creating and managing enterprise-grade CI/CD pipelines on AWS with intelligent automation.

Python 3.8+ AWS CDK MIT License

โœจ Features

  • ๐Ÿ—๏ธ Smart Pipeline Generation - Automated AWS CodePipeline creation with CDK
  • ๐Ÿ“ฆ Multi-Language Support - Python, Node.js, React, and more
  • ๐Ÿงช Advanced Build Stages - SonarQube, Snyk, Codecov, ESLint, Bandit integration
  • ๐Ÿ“ง Intelligent Notifications - Slack, Email, Webhooks with smart alerting rules
  • ๐Ÿ“‹ Pipeline Templates - Reusable templates for faster setup
  • ๐Ÿ”„ Template Inheritance - Extend and customize existing templates
  • โš™๏ธ Interactive CLI - User-friendly prompts and rich console output
  • ๐Ÿ›ก๏ธ Security First - Built-in security scanning and best practices

๐Ÿš€ Quick Start

Installation

# 1. Clone and setup
git clone <repository-url>
cd pipeline_creator

# 2. Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Mac/Linux
# or .venv\Scripts\activate  # Windows

# 3. Install dependencies
pip install -e .
pip install aiohttp email-validator  # For notifications

Create Your First Pipeline

# 1. Initialize a new pipeline
pipeline init

# 2. Use a template for quick setup (optional)
pipeline templates use react-app -P app_name=my-app

# 3. Generate AWS infrastructure
pipeline generate

# 4. Deploy your pipeline
pipeline deploy

๐Ÿ“‹ Complete Command Reference

Core Pipeline Commands

pipeline init

Initialize pipeline configuration in your project.

pipeline init                    # Interactive setup
pipeline init --name my-app     # Quick setup with name

pipeline generate

Generate AWS CDK infrastructure files.

pipeline generate               # Generate all infrastructure
pipeline generate --force      # Overwrite existing files

pipeline deploy

Deploy your pipeline to AWS.

pipeline deploy                 # Deploy with confirmation
pipeline deploy --auto-approve  # Skip confirmations

pipeline status

Check your pipeline status.

pipeline status                 # Show current status
pipeline status --detailed     # Include execution history

pipeline logs

View pipeline logs.

pipeline logs                   # Latest execution logs
pipeline logs --build-id <id>  # Specific build logs

๐Ÿงช Extra Build Stages

pipeline add-stage

Add specialized build stages to your pipeline.

pipeline add-stage              # Interactive stage selection
pipeline add-stage sonarqube   # Add SonarQube analysis
pipeline add-stage snyk        # Add security scanning
pipeline add-stage codecov     # Add coverage reporting
pipeline add-stage docker      # Add Docker build

Available Stages:

  • ๐Ÿ” SonarQube Cloud - Code quality analysis
  • ๐Ÿ›ก๏ธ Snyk Security - Vulnerability scanning
  • ๐Ÿ“Š Codecov - Coverage reporting
  • ๐Ÿณ Docker Build - Container builds
  • ๐Ÿงน ESLint - JavaScript/TypeScript linting
  • ๐Ÿ Bandit - Python security linting
  • โš™๏ธ Custom Stages - Define your own build steps

๐Ÿ“ง Notification System

pipeline notifications

Intelligent notification management with smart alerting rules.

# Setup notifications
pipeline notifications setup              # Interactive setup
pipeline notifications setup -c slack    # Setup specific channel

# Check status
pipeline notifications status            # View current config

# Test notifications  
pipeline notifications test              # Send test messages

# Disable notifications
pipeline notifications disable           # Disable all channels

Supported Channels:

  • ๐Ÿ“ง Email - HTML/text email notifications via SMTP
  • ๐Ÿ“ข Slack - Rich webhook notifications with formatting
  • ๐Ÿ”— Webhooks - Custom HTTP endpoints with JSON payloads

Smart Features:

  • โšก Failure Alerts - Always notify on pipeline failures
  • ๐ŸŽ‰ Recovery Notifications - Alert when pipeline recovers
  • ๐Ÿ”‡ Spam Prevention - Intelligent rules to reduce noise
  • ๐Ÿ“ˆ Event History - Track notification patterns

๐Ÿ“‹ Template System

pipeline templates

Powerful template system for reusable pipeline configurations.

# List available templates
pipeline templates list                   # All templates
pipeline templates list --category api   # Filter by category

# Get template information
pipeline templates info react-app        # Detailed template info

# Use templates
pipeline templates use react-app \
  -P app_name=my-app \
  -P test_coverage_threshold=90

# Create custom templates
pipeline templates create my-template \
  --description "My custom pipeline" \
  --category web-frontend \
  --author "My Team"

# Template inheritance
pipeline templates extend react-app enhanced-react \
  --description "Enhanced React template"

# Share templates
pipeline templates export react-app template.json
pipeline templates import-template template.json

Predefined Templates:

  • ๐ŸŒ react-app - Complete React application with S3 + CloudFront
  • ๐Ÿ”Œ python-api - Python/FastAPI API with ECS Fargate
  • ๐ŸŸจ nodejs-api - Node.js/Express API with containers

Template Categories:

  • web-frontend - Frontend applications
  • web-backend - Backend services
  • api - API services
  • microservice - Microservices
  • mobile - Mobile applications
  • data-processing - Data pipelines
  • ml-ai - Machine Learning workflows

๐Ÿ› ๏ธ Prerequisites

  • Python 3.8+ with pip
  • AWS CLI configured (aws configure)
  • Node.js 16+ (for AWS CDK)
  • Docker (optional, for containerized builds)

๐Ÿ“ Project Structure

After initialization, your project will have:

your-project/
โ”œโ”€โ”€ pipeline.json           # Main pipeline configuration
โ”œโ”€โ”€ .pipeline/             
โ”‚   โ”œโ”€โ”€ cdk/               # Generated CDK files
โ”‚   โ”œโ”€โ”€ config.json        # Internal configuration
โ”‚   โ””โ”€โ”€ templates/         # User templates (if any)
โ””โ”€โ”€ buildspec.yml          # CodeBuild specification

๐ŸŽฏ Configuration Examples

Basic Python API Pipeline

{
  "name": "my-python-api",
  "project_type": "python",
  "runtime": {
    "language": "python", 
    "version": "3.11"
  },
  "build": {
    "commands": [
      "pip install -r requirements.txt",
      "pytest tests/",
      "docker build -t my-api ."
    ]
  },
  "deploy": {
    "type": "ecs-fargate",
    "config": {
      "container_port": 8000,
      "cpu": 256,
      "memory": 512
    }
  }
}

React App with Extra Stages

{
  "name": "my-react-app",
  "project_type": "react",
  "extra_stages": [
    {
      "name": "sonarqube",
      "type": "sonarqube_cloud",
      "config": {
        "project_key": "my-sonar-key",
        "sources": "src"
      }
    },
    {
      "name": "security-scan", 
      "type": "snyk",
      "config": {
        "language": "nodejs",
        "severity_threshold": "high"
      }
    }
  ],
  "notifications": {
    "enabled": true,
    "channels": ["slack", "email"],
    "events": ["pipeline_failed", "deploy_completed"]
  }
}

๐Ÿš€ Advanced Usage

Environment Variables

Set these environment variables for enhanced functionality:

export SONAR_TOKEN="your-sonar-token"
export SNYK_TOKEN="your-snyk-token" 
export CODECOV_TOKEN="your-codecov-token"
export SLACK_WEBHOOK_URL="your-slack-webhook"

Custom Build Stages

Add custom build logic to your pipeline:

{
  "extra_stages": [
    {
      "name": "custom-build",
      "type": "custom",
      "config": {
        "commands": [
          "echo 'Running custom build steps'",
          "npm run custom-script",
          "python custom_script.py"
        ],
        "environment_variables": {
          "CUSTOM_VAR": "custom_value"
        }
      }
    }
  ]
}

๐Ÿงช Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=pipeline_creator --cov-report=html

# Run specific test modules
pytest tests/test_templates.py
pytest tests/test_notifications.py

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Install development dependencies (pip install -e .[dev])
  4. Write tests for your changes
  5. Run tests (pytest)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Create a Pull Request

Development Setup

# Install development dependencies
pip install -e .[dev]

# Install pre-commit hooks
pre-commit install

# Run linting
flake8 pipeline_creator/
black pipeline_creator/

# Run type checking
mypy pipeline_creator/

๐Ÿ“š Documentation

โ“ Troubleshooting

Common Issues

Q: "ModuleNotFoundError" when running commands
A: Make sure you've activated your virtual environment and installed dependencies:

source .venv/bin/activate
pip install -e .

Q: AWS deployment fails with permissions error
A: Ensure your AWS credentials have the necessary permissions:

aws sts get-caller-identity  # Check current identity
aws configure list          # Check configuration

Q: Notifications not working
A: Check your notification configuration:

pipeline notifications status
pipeline notifications test

๐ŸŽ‰ What's New

v0.3.0 - Template System

  • โœจ Complete template system with inheritance
  • ๐Ÿ“‹ 3 predefined templates (React, Python API, Node.js API)
  • ๐Ÿ”„ Template import/export functionality
  • ๐ŸŽฏ Interactive parameter configuration

v0.2.0 - Smart Notifications

  • ๐Ÿ“ง Multi-channel notification support (Email, Slack, Webhooks)
  • โšก Smart alerting rules to reduce spam
  • ๐ŸŽจ Rich HTML email templates
  • ๐Ÿ“Š Event history and analytics

v0.1.0 - Core Features

  • ๐Ÿ—๏ธ AWS CodePipeline generation with CDK
  • ๐Ÿงช Extra build stages (SonarQube, Snyk, Codecov)
  • โš™๏ธ Interactive CLI with rich console output
  • ๐Ÿ“ฆ Multi-language project support

๐Ÿ”ฎ What's Next

We're continuously improving Pipeline Creator CLI! Here's our exciting roadmap:

๐ŸŽฏ v0.4.0 - Multi-Environment Support (In Progress)

  • ๐ŸŒ Environment Management - Staging, production, and custom environments
  • ๐Ÿšช Approval Gates - Manual approval workflows between environments
  • ๐Ÿ”„ Progressive Deployments - Blue-green and canary deployment strategies
  • โš™๏ธ Environment-Specific Configs - Different settings per environment
  • ๐Ÿ” Automatic Rollbacks - Smart rollback on deployment failures
  • ๐Ÿท๏ธ Environment Tagging - Resource organization and cost tracking

๐Ÿš€ v0.5.0 - Enhanced Pipeline Intelligence

  • ๐Ÿ“Š Pipeline Analytics - Performance metrics and deployment insights
  • ๐Ÿค– AI-Powered Optimization - Automatic pipeline improvements suggestions
  • ๐Ÿ” Dependency Analysis - Smart dependency tracking and updates
  • ๐Ÿ“ˆ Cost Optimization - AWS cost analysis and recommendations
  • ๐Ÿ•’ Scheduling - Time-based deployments and maintenance windows

๐Ÿ›ก๏ธ v0.6.0 - Enterprise Security & Governance

  • ๐Ÿ” RBAC Integration - Role-based access control with AWS IAM
  • ๐Ÿ“‹ Compliance Templates - SOC2, HIPAA, PCI-DSS compliant pipelines
  • ๐Ÿ›ก๏ธ Secret Management - AWS Secrets Manager and Parameter Store integration
  • ๐Ÿ“Š Audit Trails - Comprehensive deployment and change logging
  • ๐Ÿ”’ Policy Enforcement - Automated policy compliance checking

๐ŸŒ v0.7.0 - Multi-Cloud & Hybrid Support

  • โ˜๏ธ Azure DevOps - Azure Pipelines generation and deployment
  • ๐Ÿ”ง Google Cloud Build - GCP pipeline creation and management
  • ๐Ÿข On-Premise Integration - Jenkins and GitLab CI/CD support
  • ๐Ÿ”— Multi-Cloud Deployments - Cross-cloud deployment strategies
  • ๐Ÿ“ฆ Universal Templates - Cloud-agnostic pipeline templates

๐ŸŽจ v0.8.0 - Developer Experience Enhancements

  • ๐Ÿ–ฅ๏ธ Web Dashboard - Visual pipeline builder and monitoring
  • ๐Ÿ“ฑ Mobile App - Pipeline monitoring on the go
  • ๐Ÿ”Œ IDE Extensions - VS Code, IntelliJ, and other IDE integrations
  • ๐Ÿค Git Integration - Advanced Git hooks and branch strategies
  • ๐Ÿ“ Documentation Generator - Auto-generate pipeline documentation

๐Ÿงช v0.9.0 - Advanced Testing & Quality

  • ๐Ÿค– Automated Testing - AI-powered test generation and execution
  • ๐Ÿ” Performance Testing - Load testing integration (k6, JMeter)
  • ๐ŸŒ Cross-Browser Testing - Selenium Grid and Playwright support
  • ๐Ÿ“Š Quality Gates - Advanced quality metrics and thresholds
  • ๐Ÿ› Bug Prevention - Predictive analysis for common issues

๐Ÿ“ฆ v1.0.0 - Production Ready Enterprise Edition

  • ๐Ÿข Enterprise Templates - Industry-specific pipeline templates
  • ๐Ÿ“Š Executive Dashboards - C-level reporting and insights
  • ๐ŸŽ“ Training Materials - Comprehensive documentation and tutorials
  • ๐Ÿ”ง Professional Support - Dedicated support channels
  • ๐Ÿš€ Performance Optimization - Enterprise-scale performance tuning

๐Ÿ’ก Community Requests

Vote for features you'd like to see next! Open an issue with the feature-request label:

  • ๐Ÿ Python Package Publishing - PyPI integration for Python projects
  • ๐Ÿ“ฆ Docker Registry Support - Private registry integration (ECR, Docker Hub)
  • ๐ŸŒŠ Kubernetes Deployments - EKS and self-managed K8s support
  • ๐Ÿ”„ GitOps Integration - ArgoCD and Flux support
  • ๐Ÿ“ง Microsoft Teams - Teams notification channel
  • ๐ŸŽฏ Terraform Integration - Infrastructure as Code workflows
  • ๐Ÿ”’ HashiCorp Vault - Advanced secret management
  • ๐Ÿ“ˆ Datadog Integration - Enhanced monitoring and alerting

๐Ÿค Contributing to the Roadmap

We value community input! Here's how you can influence our roadmap:

  1. ๐Ÿ—ณ๏ธ Vote on Features - Star issues you'd like prioritized
  2. ๐Ÿ’ก Suggest Ideas - Open feature request issues
  3. ๐Ÿ› ๏ธ Contribute Code - Submit PRs for roadmap items
  4. ๐Ÿ› Report Issues - Help us improve current features
  5. ๐Ÿ“– Improve Docs - Documentation contributions welcome

Join our Discord Community for roadmap discussions!

๐Ÿ“„ License

MIT License - see the LICENSE file for details.


Made with โค๏ธ by the Pipeline Creator Team

Streamlining DevOps, one pipeline at a time.

About

A CLI tool for creating and managing CI/CD pipelines on AWS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages