Concourse-CI-inspired YAML format for defining workflows. Compiles to standard WorkflowDefinition + step factories. Features: - Schema parsing with serde_yaml (YamlWorkflow, YamlStep, StepConfig) - ((var.path)) interpolation from config maps at load time - YAML anchors (&anchor/*alias) fully supported - Validation at load time (no runtime surprises) - Shell executor: runs commands via tokio::process, captures stdout, parses ##wfe[output name=value] annotations for structured outputs - Compiler: sequential wiring, parallel blocks, on_failure/on_success/ ensure hooks, error behavior mapping - Public API: load_workflow(), load_workflow_from_str() - 23 tests (schema, interpolation, compiler, e2e)
14 lines
425 B
Rust
14 lines
425 B
Rust
#[derive(Debug, thiserror::Error)]
|
|
pub enum YamlWorkflowError {
|
|
#[error("YAML parse error: {0}")]
|
|
Parse(#[from] serde_yaml::Error),
|
|
#[error("Interpolation error: unresolved variable '{0}'")]
|
|
UnresolvedVariable(String),
|
|
#[error("Validation error: {0}")]
|
|
Validation(String),
|
|
#[error("Compilation error: {0}")]
|
|
Compilation(String),
|
|
#[error("IO error: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
}
|