A lightweight CI system written in Rust, featuring a Web UI, REST API, and CLI client.
-
Web UI: Modern interface with Tailwind CSS dark theme
- Multi-user authentication (session-based)
- Real-time log streaming via SSE
- Job/Run management
- Trigger and Webhook management
-
REST API: Full programmatic access
- Status and health endpoints
- Job and run management
- Webhook integration (GitHub, GitLab, Gogs)
-
CLI Client: Command-line tool with RPC support
ruci submit- Submit jobs from YAML filesruci job- Manage jobs (list, queue, abort)ruci run- Local execution and monitoringruci config- Configuration management
-
Advanced Features
- Scheduled triggers (cron-based)
- Webhook triggers (GitHub/GitLab/Gogs)
- VCS integration (automatic git checkout)
- Artifact storage (local or S3)
- Job archival with rotation
- Prometheus metrics
| Component | Technology |
|---|---|
| Core | Rust |
| RPC | Tarpc |
| Web Framework | Axum |
| Database | SQLite / PostgreSQL / MySQL (via sqlx) |
| S3 Storage | aws-sdk-s3 |
| CLI | Clap |
| Authentication | bcrypt |
| Scheduling | tokio-cron-scheduler |
- Rust 1.70+
- Cargo
make buildmake dev
# Or with custom config:
./bin/rucid --config /path/to/ruci.yaml# Submit a job
./bin/ruci submit run --file .ruci.yml
# List jobs
./bin/ruci job list
# Check status
./bin/ruci status
# Validate config
./bin/ruci config validate --config /path/to/ruci.yamlrucicd/
├── Cargo.toml # Workspace configuration
├── Makefile # Build scripts
├── README.md # This file
├── AGENTS.md # Development guidelines
├── TODO.md # Project tasks
│
├── ruci/ # CLI client crate
│ └── src/main.rs
│
├── rucid/ # Daemon server crate
│ └── src/
│ ├── main.rs # Main entry point
│ └── web/
│ ├── handlers.rs # HTTP handlers & Web UI
│ └── webhooks.rs # Webhook processing
│
├── ruci-core/ # Core library crate
│ └── src/
│ ├── lib.rs # AppContext definition
│ ├── config.rs # Configuration management
│ ├── db.rs # Database operations
│ ├── queue.rs # Job queue (flume)
│ ├── executor.rs # Bash executor
│ ├── storage.rs # Storage abstraction
│ ├── rpc.rs # RPC server
│ ├── trigger.rs # Cron scheduler
│ ├── auth.rs # Authentication
│ ├── metrics.rs # Prometheus metrics
│ ├── archive.rs # Job archival
│ └── vcs.rs # VCS/Git operations
│
├── ruci-protocol/ # RPC protocol definitions
│ └── src/lib.rs # Service trait & types
│
└── contrib/ # Deployment files
├── ruci.yaml.example # Configuration example
├── rucid.service # systemd service
├── docker/
│ ├── Dockerfile
│ └── entrypoint.sh
├── docker-compose.yml
└── install.sh
Configuration file is loaded from (in order of priority):
./ruci.yaml(current directory)~/.config/ruci/ruci.yaml(user directory)/etc/ruci/ruci.yaml(system directory)
Or specify with --config flag:
./bin/rucid --config /path/to/config.yamlSee contrib/ruci.yaml.example for full configuration options.
Jobs are defined in YAML files (.ruci.yml or .ruci.yaml):
name: hello-world
context: default
timeout: 300
env:
BUILD_VERSION: "1.0.0"
steps:
- name: checkout
command: git clone $REPO_URL /tmp/build
- name: build
command: make -C /tmp/build
- name: test
command: make test -C /tmp/build
- name: archive
command: tar czf /tmp/build.tar.gz /tmp/build
artifacts:
- /tmp/build.tar.gzRuci supports webhooks from multiple VCS platforms:
- GitHub: HMAC-SHA256 signature verification
- GitLab: Token-based verification
- Gogs: Signature verification
Events supported:
- Push
- Pull Request / Merge Request
Webhook payloads are automatically parsed and VCS info (clone URL, branch, commit) is passed to jobs.
This project is licensed under either of:
at your option.