A minimal, educational CI/CD pipeline tool built from scratch using Python with file-based persistence.
- π Webhook Listener: Receives GitHub push events via HTTP server
- π Job Queue: File-based job management with status tracking
- π Pipeline Parser: Reads
.cicd.ymlconfiguration files - β‘ Executor: Runs pipeline steps using subprocess
- π Dashboard: CLI interface to view jobs and logs
- π Security Scanner: Basic security scanning of repositories
pip install -r requirements.txtpython start_server.pyYou should see:
Starting CI/CD Pipeline Server...
Webhook listener: http://localhost:8080/webhook
Starting job executor...
python debug_test.pyThis creates a test job and triggers the webhook.
# View recent jobs
python simple_dashboard.py jobs
# View specific job logs
python simple_dashboard.py logs <job_id># Terminal 1: Start server
python start_server.py
# Terminal 2: Create a test job
python debug_test.py
# Terminal 3: Check results
python simple_dashboard.py jobsAfter running the demo, you'll see:
- Server logs: Job processing in real-time
- Job creation: New job added to queue
- Dashboard: Job status and execution logs
# View persistent job storage
type jobs.json
# Check cloned repositories
dir workspaceCreate a .cicd.yml file in your repository:
name: "My Pipeline"
steps:
- name: "setup"
run: "python --version"
- name: "install"
run: "pip install -r requirements.txt"
- name: "test"
run: "python -m pytest"
- name: "build"
run: "python setup.py sdist"- Expose server: Install ngrok and run
ngrok http 8080 - Add webhook: GitHub repo β Settings β Webhooks β Add webhook
- URL:
https://your-ngrok-url.ngrok.io/webhook - Content-type:
application/json - Events: Just push events
start_server.py- Main server entry pointsimple_dashboard.py- CLI dashboard for viewing jobsdebug_test.py- Webhook testing scriptshared_queue.py- Shared job queue instance
core/webhook_listener.py- HTTP webhook servercore/executor.py- Pipeline execution enginecore/file_queue.py- File-based job queuecore/pipeline_parser.py- Git operations & .cicd.yml parsercore/security_scanner.py- Basic security scanningmodels/job.py- Job data model
jobs.json- Persistent job storage (auto-created)workspace/- Git repositories (auto-created)
GitHub Push β Webhook β Job Queue β Executor β Pipeline Steps β Results
β β β β β β
Payload HTTP POST jobs.json Git Clone Run Commands Logs
# Start the CI/CD server
python start_server.py
# Test webhook functionality
python debug_test.py
# View all jobs
python simple_dashboard.py jobs
# View specific job logs
python simple_dashboard.py logs <job_id>
# View recent 5 jobs only
python simple_dashboard.py jobs 5- queued β Job created, waiting for processing
- running β Job being executed by server
- done β Job completed successfully β
- failed β Job failed during execution β
cicd_scripting/
βββ core/ # Core pipeline components
β βββ executor.py # Runs pipeline steps
β βββ file_queue.py # Job queue management
β βββ pipeline_parser.py # Git & .cicd.yml handling
β βββ security_scanner.py # Security scanning
β βββ webhook_listener.py # HTTP webhook server
βββ models/
β βββ job.py # Job data structure
βββ config/
β βββ settings.py # Configuration
βββ tests/
β βββ sample_files/ # Test configurations
βββ sample_repo/
β βββ .cicd.yml # Example pipeline config
βββ start_server.py # π Main server
βββ simple_dashboard.py # π View jobs & logs
βββ debug_test.py # π§ͺ Test webhook
βββ shared_queue.py # Shared job queue
βββ requirements.txt # Dependencies
Server won't start?
- Check if port 8080 is available
- Ensure all dependencies are installed
Jobs failing?
- Check git is installed and accessible
- Verify repository URLs are correct
- Check job logs:
python simple_dashboard.py logs <job_id>
No webhook response?
- Ensure server is running on localhost:8080
- Check firewall settings for local testing
Use pre-built templates for common project types:
# List available templates
python generate_template.py list
# Generate Next.js template
python generate_template.py nextjs/basic
# Generate Python template
python generate_template.py python/basicAvailable Templates:
nextjs/basic- Simple Next.js projectsnextjs/full- Comprehensive Next.js with testingnextjs/deployment- Production deployment pipelinepython/basic- Python projects with pytestpython/django- Django web applicationsnodejs/express- Express.js applications
See TEMPLATES.md for detailed documentation.
Monitor and optimize pipeline performance:
# Start server with benchmarking
python start_server_benchmark.py
# View performance overview
python benchmarking/benchmark_dashboard.py overview
# Analyze step performance
python benchmarking/benchmark_dashboard.py steps
# Identify bottlenecks
python benchmarking/benchmark_dashboard.py bottlenecksSee benchmarking/README.md for detailed documentation.
- Use templates: Generate
.cicd.ymlwithpython generate_template.py - Monitor performance: Use benchmarking tools to optimize pipelines
- Add real repositories: Update webhook payloads
- Deploy to server: Use ngrok for GitHub integration
- Extend functionality: Add notifications, artifacts, etc.
- Terminal 1:
python start_server.py(Server starts) - Terminal 2:
python debug_test.py(Creates job) - Terminal 1: Watch job processing logs
- Terminal 2:
python simple_dashboard.py jobs(View results) - Terminal 2:
python simple_dashboard.py logs <job_id>(View details)
Expected Output: Job processes successfully with Python version check, file listing, and echo command.
Built with β€οΈ for learning CI/CD concepts