Skip steps when running locally

I am not able to make Conditionals work when running pipelines locally with the bk CLI. Here is the simplest example I came up with:

  - label: "all"
    cmd: echo "I shall run always"
  - label: "skip locally"
    if: build.source != 'local'
    cmd: echo "I should not run locally"

The result when I run bk run local .buildkite/pipeline.yml is that both steps run but I would expect only the first step “all” were executed. I tried several “if” statement combination but none worked.

Hi @cgalancladera! :wave:

Welcome to the community! :hugs:

Unfortunately is a known issue for us, we haven’t had the capacity to integrate conditionals to the bk CLI tool, but we are doing some internal changes so we can properly maintain it.
You are most than welcome on submitting a PR on the repo, and we’ll be happy to review it :raised_hands:


Oh I see…

Thank you for answering though!

1 Like