Skip to content

Jenkins AI agent for DevOps and AI collaboration to create pipelines and jobs.

Notifications You must be signed in to change notification settings

zim0101/pipe-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Pipe Pilot

╔═══════════════════════════════════════════════════════════════════════════════╗
β•‘                                                                               β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—        β•‘
β•‘   β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•        β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘           β•‘
β•‘   β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β•      β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘           β•‘
β•‘   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘           β•‘
β•‘   β•šβ•β•     β•šβ•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•    β•šβ•β•     β•šβ•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•    β•šβ•β•           β•‘
β•‘                                                                               β•‘
β•‘              πŸš€ AI-Powered Jenkins Pipeline Generator πŸš€                      β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

The ultimate AI-powered DevOps automation tool that transforms any GitHub repository into a production-ready Jenkins CI/CD pipeline in minutes!

License: MIT Python 3.12+ Jenkins AI Powered

✨ What is Pipe Pilot?

Pipe Pilot is a revolutionary AI-powered tool that automatically generates complete Jenkins CI/CD pipelines by analyzing your repository structure, dependencies, and technology stack. No more manual pipeline configuration - just point it at your GitHub repo and watch the magic happen!

🎯 Key Features

  • πŸ€– AI-Powered Analysis: Uses advanced AI models (Claude, GPT-4, Llama) to understand your codebase
  • πŸ” Multi-Language Support: JavaScript/TypeScript, Python, Java, Go, Rust, PHP, and more
  • πŸ” Smart SSH Detection: Automatically detects and uses your SSH configuration
  • πŸ—οΈ Complete Automation: Git push + Jenkins job creation + plugin installation
  • πŸ“¦ Plugin Intelligence: Only installs missing plugins based on your Jenkins instance
  • πŸ”„ Interactive Refinement: Chat with AI to improve your pipeline
  • πŸŽ›οΈ Production Ready: Generates immediately usable Jenkins configurations

πŸš€ How It Works

  1. Clone & Analyze - Downloads and analyzes your repository locally
  2. AI Generation - Creates Jenkinsfile, job config, and plugin requirements
  3. Interactive Chat - Refine the pipeline with natural language feedback
  4. Automation - Pushes code, creates Jenkins jobs, installs plugins
  5. Ready to Use - Your CI/CD pipeline is live and running!

πŸ› οΈ Installation

Prerequisites

  • Python 3.12+
  • Git configured with SSH keys
  • Jenkins 2.400+ running locally or remotely
  • OpenRouter API Key (Get free key)

Quick Install

# Clone the repository
git clone git@github.com:zim0101/pipe-pilot.git
cd pipe-pilot

# Create virtual environment and activate
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Set up environment
cp .env.example .env
vim .env
or 
touch .env

Configuration

Edit .env file with your settings:

# AI Configuration
OPENROUTER_API_KEY=your_openrouter_api_key_here
AI_MODEL=anthropic/claude-3-haiku

# Jenkins Configuration  
JENKINS_URL=http://localhost:8080
JENKINS_USERNAME=admin
JENKINS_TOKEN=your_jenkins_api_token

# Optional
JENKINS_CLI_JAR=./jenkins-cli.jar

πŸ”‘ Getting API Keys

  1. OpenRouter API Key:

    • Visit OpenRouter.ai
    • Sign up for free account
    • Generate API key from dashboard
    • Add to .env file
  2. Jenkins API Token:

    • Go to Jenkins β†’ User β†’ Security β†’ API Token
    • Generate new token
    • Add to .env file

πŸš€ Usage

Basic Usage

# Generate pipeline for any GitHub repository
python main.py https://github.com/username/repository

# Use specific AI model
python main.py https://github.com/username/repo anthropic/claude-3.5-sonnet

Interactive Example

$ python main.py https://github.com/facebook/react

# 🎨 ASCII banner displays
# πŸ” Environment verification
# πŸ“Š Repository analysis  
# πŸ€– AI pipeline generation

πŸ’¬ Interactive Mode - Provide feedback to improve the pipeline
πŸ“ Your feedback (or 'exit'/'ready'): add docker build stage

# ✏️ AI modifies the pipeline

πŸ“ Your feedback (or 'exit'/'ready'): ready

# πŸš€ Full automation begins:
# βœ… Jenkinsfile committed and pushed
# βœ… Jenkins job created  
# βœ… Required plugins installed

🏁 Your Jenkins pipeline is ready to use!

Command Options

Command Description
python main.py <repo_url> Generate pipeline for repository
python main.py <repo_url> <model> Use specific AI model
--help Show help information

Interactive Commands

Command Description
ready Start full automation (git + jenkins + plugins)
help Show example feedback prompts
exit/quit End session
Any text Provide feedback to improve pipeline

πŸŽ›οΈ Supported Technologies

Languages & Frameworks

  • JavaScript/TypeScript: React, Vue, Angular, Next.js, Express
  • Python: Django, Flask, FastAPI
  • Java: Spring Boot, Maven, Gradle
  • Go: Go modules
  • Rust: Cargo
  • PHP: Composer
  • And many more...

Build Tools

  • npm, Yarn, pnpm
  • Maven, Gradle
  • Docker, Docker Compose
  • pip, Poetry
  • Cargo
  • Go modules

CI/CD Features

  • Multi-stage pipelines
  • Docker build & push
  • Automated testing
  • Code quality analysis
  • Deployment automation
  • Slack/email notifications

πŸ”§ Advanced Configuration

Custom AI Models

Pipe Pilot supports multiple AI providers:

# Claude models (recommended)
AI_MODEL=anthropic/claude-3-haiku          # Fast & cheap
AI_MODEL=anthropic/claude-3.5-sonnet       # Best quality

# OpenAI models  
AI_MODEL=openai/gpt-4o                     # High quality
AI_MODEL=openai/gpt-3.5-turbo             # Balanced

# Open source models
AI_MODEL=meta-llama/llama-3.1-8b-instruct:free  # Free tier

Jenkins Configuration

# Local Jenkins
JENKINS_URL=http://localhost:8080

# Remote Jenkins  
JENKINS_URL=https://jenkins.yourcompany.com

# Custom port
JENKINS_URL=http://localhost:9090

πŸ“ Generated Files

Pipe Pilot creates these files in the output/ directory:

  • Jenkinsfile - Complete declarative pipeline
  • pipeline_job_config.xml - Jenkins job configuration
  • required_plugins.xml - Missing plugins to install
  • repository_analysis.json - Detailed code analysis
  • jenkins_context.json - Jenkins environment info

πŸ› Troubleshooting

Common Issues

API Key Not Working

# Verify API key is set
echo $OPENROUTER_API_KEY

# Check .env file
cat .env | grep OPENROUTER_API_KEY

Jenkins Connection Failed

# Test Jenkins connectivity
curl http://localhost:8080/api/json

# Check Jenkins CLI
java -jar jenkins-cli.jar -s http://localhost:8080 version

Debug Mode

Enable verbose output:

DEBUG=true python main.py https://github.com/username/repo

🀝 Contributing

We love contributions! Here's how to help:

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request

Development Setup

# Clone for development
git clone git@github.com:zim0101/pipe-pilot.git
cd pipe-pilot

# Install development dependencies
pip install -r requirements.txt

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenRouter for providing access to multiple AI models
  • Jenkins community for the amazing CI/CD platform
  • Anthropic for Claude AI models
  • GitHub for hosting and Git integration

πŸ”— Links


Made with ❀️ by the Team Radioactive

⭐ Star this repo if Pipe Pilot helped you! ⭐

About

Jenkins AI agent for DevOps and AI collaboration to create pipelines and jobs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages