Kodo CI
Project description
koci - Universal CI Definition Tool
One CI file to rule them all.
koci is a universal CI definition tool that lets you:
- 🚀 Run CI pipelines locally using Docker/Podman
- 🔄 Export to any platform - GitHub Actions, Jenkins, GitLab CI, and more
- 📦 Start simple, scale up - One file that grows with your project
Why koci?
Every CI platform has its own syntax. When you switch platforms or need to run CI locally, you're stuck rewriting everything. koci solves this with a universal format that:
- Works locally with Docker containers
- Exports to major CI platforms with one command
- Validates your pipeline before you push
- Watches files and auto-runs on changes
Installation
pip install koci
Or install from source:
git clone https://github.com/kodo/koci.git
cd koci
pip install -e .
Quick Start
1. Create a Pipeline
koci init
This detects your project type (Node.js, Python, Go, etc.) and creates a koci.yml:
version: "1"
name: my-app
stages:
- build
- test
jobs:
install:
stage: build
image: node:20-alpine
steps:
- run: npm ci
artifacts:
paths:
- node_modules/
test:
stage: test
image: node:20-alpine
needs: [install]
steps:
- run: npm test
artifacts:
consume: [install]
2. Validate
koci validate
3. Run Locally
koci run
Run a specific stage:
koci run --stage test
4. Export to CI Platform
# GitHub Actions
koci export github-actions
# Jenkins
koci export jenkins
# GitLab CI
koci export gitlab
Commands
| Command | Description |
|---|---|
koci init |
Create a starter koci.yml |
koci validate |
Validate pipeline syntax |
koci run |
Execute pipeline locally |
koci run --stage <name> |
Run specific stage |
koci export <platform> |
Export to CI platform |
koci watch |
Auto-run on file changes |
koci visualize |
Show pipeline graph |
koci info |
Show pipeline summary |
Pipeline Syntax
Stages & Jobs
stages:
- build
- test
- deploy
jobs:
compile:
stage: build
image: node:20
steps:
- run: npm ci
- run: npm run build
Dependencies
jobs:
test:
stage: test
needs: [compile] # Wait for compile to finish
steps:
- run: npm test
Artifacts
jobs:
build:
stage: build
steps:
- run: npm run build
artifacts:
paths:
- dist/
deploy:
stage: deploy
needs: [build]
artifacts:
consume: [build] # Get artifacts from build job
steps:
- run: ./deploy.sh
Matrix Builds
jobs:
test:
stage: test
matrix:
node: [18, 20, 22]
os: [alpine, slim]
steps:
- run: npm test
Services
services:
test: # Services for the test stage
- image: postgres:15
env:
POSTGRES_PASSWORD: test
- image: redis:7
jobs:
integration:
stage: test
steps:
- run: npm run test:integration
Conditions
Simple conditions:
jobs:
deploy:
when: branch == 'main'
steps:
- run: ./deploy.sh
Complex conditions:
jobs:
deploy:
if: ${{ success() && env.DEPLOY_ENABLED == 'true' }}
steps:
- run: ./deploy.sh
Export Targets
GitHub Actions
koci export github-actions
# Creates .github/workflows/ci.yml
Jenkins
koci export jenkins
# Creates Jenkinsfile
GitLab CI
koci export gitlab
# Creates .gitlab-ci.yml
Configuration
Secrets
Create .koci.secrets.yml (gitignored):
env:
AWS_ACCESS_KEY: xxx
AWS_SECRET_KEY: xxx
Global Environment
env:
NODE_ENV: production
CI: "true"
Default Image
defaults:
image: node:20-alpine
working_directory: /app
Development
# Setup
make virtualenv
source env/bin/activate
# Run tests
make test
# Run koci
koci --help
Roadmap
- Core pipeline execution
- GitHub Actions export
- Jenkins export
- GitLab CI export
- CircleCI export
- Concourse export
- Azure Pipelines export
- Parallel job execution
- Remote cache support
- Plugin system
License
MIT License - see LICENSE.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file koci-0.1.0.tar.gz.
File metadata
- Download URL: koci-0.1.0.tar.gz
- Upload date:
- Size: 56.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70ecaf71127e0e5e4eed40d0024901905d912ee020ecffff998cd77acbd4f4c0
|
|
| MD5 |
b199366a16cb5fe4f1a29a436c3a37f7
|
|
| BLAKE2b-256 |
f203a323427f943ef0b0150d2355ed64a8cb4700bf249a0bc739b940e07eb2ba
|
File details
Details for the file koci-0.1.0-py3-none-any.whl.
File metadata
- Download URL: koci-0.1.0-py3-none-any.whl
- Upload date:
- Size: 70.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc7ee5adf60a9aa1c2e1a000e5e298c5f9dc833f2d2e16acaf9fd6305b6844ff
|
|
| MD5 |
2cc3cca01923d497eb7b9f971b63379c
|
|
| BLAKE2b-256 |
1790200ddc4c0112bb49eb0fca2ed0eb05e949fdb75b1286aad9c195fc6155ad
|