Maximize development team productivity through intelligent build and deployment optimization using AI to analyze pipelines, identify bottlenecks, and automatically implement optimizations for speed, cost, and reliability.
- 40-60% build time reduction through AI-powered analysis
- 30% infrastructure cost savings via intelligent optimization
- Replace $10K consulting with continuous automated optimization
- Multi-platform support for GitHub Actions, GitLab CI, Jenkins
git clone https://github.com/yourusername/cicd-optimizer.git
cd cicd-optimizer# Copy environment template
cp .env.example .env
# Add your GitHub token
export GITHUB_TOKEN=your_github_token_herecd src/optimizer
pip install -r requirements.txtpython main.py# Analyze a repository
python scripts/demo-pipeline-analysis.py https://github.com/microsoft/vscode
# Or test the API
curl http://localhost:5000/repositories/microsoft/vscode/analyzeβββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββ
β Pipeline Data βββββΆβ AI Analyzer βββββΆβ Optimization βββββΆβ Auto-Apply β
β (GitHub Actions β β (Bottleneck β β Engine β β Changes β
β GitLab, etc.) β β Detection) β β (Speed/Cost) β β (Pull Requests) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββ
GET /health
# Response includes branch and LLM provider information
{
"status": "healthy",
"service": "cicd-optimizer",
"branch": "develop",
"environment": "development",
"llm_provider": "mistral",
"github_service": "enabled"
}POST /analyze
{
"repo_url": "https://github.com/owner/repo",
"workflow_name": "CI" # optional
}POST /optimize
{
"repo_url": "https://github.com/owner/repo",
"types": ["speed", "cost"] # optional
}GET /repositories/{owner}/{repo}/analyzeThe CI/CD Optimizer uses different LLM providers based on the git branch:
mainbranch (Production): Uses Vertex AI (Google Cloud)developbranch (Development): Uses Mistral AI
GITHUB_TOKEN=your_github_token_here # Required for GitHub API access
DATABASE_URL=sqlite:///optimizer.db # Database connection
FLASK_ENV=development # Flask environment
LOG_LEVEL=INFO # Logging level
PORT=5000 # Application portFor main/production branch (Vertex AI):
VERTEX_AI_API_KEY=your_vertex_ai_key
VERTEX_AI_MODEL=gemini-pro
VERTEX_AI_ENDPOINT=your_vertex_ai_endpointFor develop branch (Mistral AI):
MISTRAL_API_KEY=your_mistral_api_key
MISTRAL_MODEL=mistral-large-latest
MISTRAL_ENDPOINT=https://api.mistral.ai/v1# Switch to develop branch
git checkout develop
# Copy development environment template
cp .env.develop .env
# Add your API keys
export GITHUB_TOKEN=your_github_token_here
export MISTRAL_API_KEY=your_mistral_api_key_here# Switch to main branch
git checkout main
# Copy production environment template
cp .env.main .env
# Add your API keys
export GITHUB_TOKEN=your_github_token_here
export VERTEX_AI_API_KEY=your_vertex_ai_key_here- Go to GitHub Settings β Developer settings β Personal access tokens
- Generate token with
repoandworkflowscopes - Add to
.envfile or export as environment variable
- Dependency Caching: Automatic cache configuration for npm, pip, Maven
- Parallel Execution: Convert sequential jobs to parallel workflows
- Build Optimization: Optimize Docker builds, test execution, asset compilation
- Runner Right-sizing: Match runner specs to workload requirements
- Trigger Optimization: Reduce unnecessary workflow runs
- Resource Efficiency: Optimize compute usage and eliminate waste
- Bottleneck Detection: Identify slow steps and failure patterns
- Trend Analysis: Track performance metrics over time
- Confidence Scoring: Rate optimization recommendations by reliability
π CI/CD Pipeline Optimizer - Live Demo
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Current Pipeline Metrics
ββββββββββββββββββββββββββββ
π Repository: vscode
π Workflow: CI
π Total Runs Analyzed: 50
π Average Duration: 12.4 minutes
π Success Rate: 94.0%
π Estimated Monthly Cost: $187.20
π Top Recommendations:
1. π₯ Add caching for npm install
π Cache dependencies for 'npm install' step to reduce execution time
β±οΈ Saves: 4.2 min | π° $67.50/month
π― Confidence: 85% | π οΈ Effort: Low - Add cache action to workflow
2. β‘ Parallelize independent jobs
π Run 3 independent steps in parallel
β±οΈ Saves: 6.1 min | π° $89.30/month
π― Confidence: 75% | π οΈ Effort: Medium - Restructure workflow jobs
π° Total Monthly Savings: $2,340.00
π
Annual Savings: $28,080.00
cd src/optimizer
docker build -t cicd-optimizer .docker run -d \
-p 5000:5000 \
-e GITHUB_TOKEN=your_token \
--name cicd-optimizer \
cicd-optimizerversion: '3.8'
services:
optimizer:
build: ./src/optimizer
ports:
- "5000:5000"
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN}
- FLASK_ENV=production
restart: unless-stoppedcd src/optimizer
python -m pytest tests/ -v --cov=.# Test with real repository (requires GITHUB_TOKEN)
python scripts/demo-pipeline-analysis.py https://github.com/your-org/your-repo# Start service
python main.py &
# Test endpoints
curl http://localhost:5000/health
curl -X POST http://localhost:5000/analyze -H "Content-Type: application/json" -d '{"repo_url":"https://github.com/microsoft/vscode"}'- β GitHub Actions: Full analysis and optimization
- β³ GitLab CI: Coming soon
- β³ Jenkins: Coming soon
- β³ Azure DevOps: Coming soon
- π Speed: Caching, parallelization, dependency optimization
- π° Cost: Runner optimization, resource right-sizing
- π Security: Coming soon
- π Reliability: Coming soon
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: support@cicd-optimizer.com
Built with β€οΈ for DevOps teams who want faster, cheaper, more reliable CI/CD pipelines.