Expand description
Pipeline executor - Coordinates building multiple images with wave-based orchestration
This module provides the PipelineExecutor which processes ZPipeline manifests,
resolving dependencies and building images in parallel waves.
§Execution Model
Images are grouped into “waves” based on their dependency depth:
- Wave 0: Images with no dependencies - can all run in parallel
- Wave 1: Images that depend only on Wave 0 images
- Wave N: Images that depend only on images from earlier waves
Within each wave, all builds run concurrently, sharing the same
BuildahExecutor (and thus cache storage).
§Example
use zlayer_builder::pipeline::{PipelineExecutor, parse_pipeline};
use zlayer_builder::BuildahExecutor;
use std::path::PathBuf;
let yaml = std::fs::read_to_string("ZPipeline.yaml")?;
let pipeline = parse_pipeline(&yaml)?;
let executor = BuildahExecutor::new_async().await?;
let result = PipelineExecutor::new(pipeline, PathBuf::from("."), executor)
.fail_fast(true)
.run()
.await?;
println!("Built {} images in {}ms", result.succeeded.len(), result.total_time_ms);Structs§
- Pipeline
Executor - Pipeline executor configuration and runtime
- Pipeline
Result - Result of a pipeline execution