@jameslnewell/buildkite-pipelines
Version:
Generate Buildkite pipelines from code.
19 lines (18 loc) • 904 B
TypeScript
import { Pipeline, StepBuilder, StepSchema } from '../lib';
export interface FindStepsPredicate {
(step: StepSchema | StepBuilder, index: number, steps: Array<StepSchema | StepBuilder>): boolean;
}
export interface FindStepsOptions {
/**
* Whether to search recursively within GroupSteps
*/
recursive?: boolean | undefined;
}
/**
* Finds all the steps that match the predicate within a pipeline
*/
export declare function findSteps(pipelineOrSteps: Pipeline | Iterable<StepSchema | StepBuilder>, predicate: FindStepsPredicate, { recursive }?: FindStepsOptions): ReadonlyArray<StepSchema | StepBuilder>;
/**
* Finds the first step that matches the predicate within a pipeline
*/
export declare function findFirstStep(pipelineOrSteps: Pipeline | Iterable<StepSchema | StepBuilder>, predicate: FindStepsPredicate, options?: FindStepsOptions): StepSchema | StepBuilder | undefined;