CLI steps don't run when there is a negated branch filter

#1

The following will skip the echo foo step when running bk local run no matter what my current branch is named.

  - command: echo foo
    branches: "!foo"

However the same thing will run fine if pushed up to Buildkite. Is this a bug or am I just not understanding something?

0 Likes

#2

:wave: Gerry!!! (sorry for the late reply…)

Good question - I’ll defer to @lox on this one. I’ll poke him in the morning and get an answer.

0 Likes

#3

:wave: No worries @keithpitt. Yep currently just commenting out the the branch filtering atm to get around this. I LOVE the CLI runner btw. It’s made debugging and testing issues so much easier and helped me getting our builds down from ~6 to ~4 minutes!

0 Likes

#4

That’s awesome to hear! I’d love to hear more about this at some point :) How did it help?

0 Likes

#5

It just allowed me to iterate faster on various theories and experimenting with how the buildkite docker compose plugin works under the hood. I’ll probably create a blog post about it.

Did you get around to poking @lox? No rush. Maybe I should add a github issue?

0 Likes

#6

Sorry it took me a while, PR here! https://github.com/buildkite/cli/pull/49

0 Likes

#7

No worries at all @lox! Thanks for looking into this! I imagine some people tried the cli, had their branches not match and then didn’t know why it wasn’t showing any output. Excited for this fix, so that I don’t have to keep removing branch filters. =D

0 Likes