Skip to content

Allow introspection into pipeline, so other steps can react #11

Description

@joscha

e.g.:

if (Math.random() < 0.5) {
  pipeline.add(conditionalA)
}

if (pipeline.hasSteps()) {
  pipeline.add(conditionalB)
}

Right now this is not possible with buildkite-graph alone, as conditional steps are still steps. The only way that is possible is to keep the state of the pipeline separate, e.g.:

let hasSteps = false;
if (Math.random() < 0.5) {
  pipeline.add(conditionalA)
  hasSteps = true;
}

if (hasSteps) {
  pipeline.add(conditionalB)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions