Expand description
Sykli - CI pipelines defined in Rust instead of YAML
§Simple usage
use sykli::Pipeline;
let mut p = Pipeline::new();
p.task("test").run("cargo test");
p.task("build").run("cargo build --release").after(&["test"]);
p.emit();§With containers and caching
use sykli::Pipeline;
let mut p = Pipeline::new();
let src = p.dir(".");
let cache = p.cache("cargo-registry");
p.task("test")
.container("rust:1.75")
.mount(&src, "/src")
.mount_cache(&cache, "/usr/local/cargo/registry")
.workdir("/src")
.run("cargo test");
p.emit();§Custom Targets
For implementing custom execution targets, see the target module.
ⓘ
use sykli::target::{Target, TaskSpec, Result};
struct MyTarget;
impl Target for MyTarget {
fn run_task(&self, task: &TaskSpec) -> Result {
// Execute tasks your way
Result::success()
}
}Modules§
- target
- Target interface - where pipelines execute.
Structs§
- Cache
Volume - A named cache volume that persists between runs.
- Condition
- A type-safe condition for when a task should run.
- Directory
- A directory resource that can be mounted into containers.
- Explain
Context - Context for evaluating conditions during explain/dry-run.
- K8sOptions
- Kubernetes-specific configuration for a task.
- K8sValidation
Error - Error from K8s options validation.
- Pipeline
- A CI pipeline with tasks and resources.
- Rust
Preset - Convenience methods for Rust projects.
- Secret
Ref - A typed reference to a secret with its source.
- Task
- A task in the pipeline.
- Task
Group - A group of tasks that can be used as a dependency.
Created by
matrix()and can be passed toafter()orchain(). - Template
- A reusable task configuration template.
Enums§
- Criticality
- Task criticality for AI prioritization.
- OnFail
Action - What AI should do when a task fails.
- Secret
Source - Source of a secret value.
- Select
Mode - How AI should select this task for execution.