Running Pipelines
Executing pipeline configurations
Running Pipelines
Pipelines can be executed either programmatically using the @ucdjs/pipelines-core library or via the ucd CLI tool, which utilizes the pipeline executor under the hood.
The CLI provides an easy way to interact with defined pipelines in your project.
# List available pipelines in your project
ucd pipelines list
# Run a specific pipeline by ID
ucd pipelines run my-pipelineTo run pipelines programmatically, you use createPipelineExecutor from @ucdjs/pipelines-core. This executor manages the Directed Acyclic Graph (DAG) execution, resolving dependencies, running routes in parallel where possible, and handling source resolution.
import { createPipelineExecutor } from "@ucdjs/pipelines-core";
const executor = createPipelineExecutor({
pipelines: [myPipeline]
});
// Run the defined pipeline
const result = await executor.run();The executor analyzes the dependencies between routes defined by their required artifacts and ensures they execute in the correct topological order. If an error occurs in a route, it halts downstream dependencies while allowing independent routes to complete if possible.