Hi my name is Diogo, i've been fancing a problem when i use "Filter builds using a conditional" on Pipeline Settings --> Bitbucket Server, my developers don't want to run a pipeline every moment when they push a new commit.
I've been trying to put in the "Filter builds using a conditional" as in the yours documentation(https://buildkite.com/docs/pipelines/conditionals) the script below:
build.message !~ /[skip]/i
Every time when i put “skip” (at the beginning, in the middle or at the end) of my commit,the pipeline works. So i’d like to know how is the best way break the pipeline without change nothing in pipeline.yml. I use bitbucket as a my repository.
First of all welcome to Buildkite community and thank you for reaching out to us with your question.
You can setup conditional filtering at pipeline level itself where you can skip triggering a build based on commit message. For that first you need to setup webhook so that pipeline can get events from BitBucket.
Now following the commit message format explained in documentation you can avoid triggering a build incase commit has those keywords. This way you do not need to define the conditional inside your pipeline yaml.
Note: Not all webhooks from Bitbucket Server contain the commit message. When a commit message is not included in a webhook, the build will run so make sure your webhook from BitBucket actually contains commit message
I hope this helps with your question and please let us know if you have any further questions.