Hi!
Is it possible to logic OR two different start conditions?
In our case, we want to start a pipeline whenever a commit has been made to the master branch OR when a pull request has been raised. We currently do this by having two separate pipeline start conditions as follows:
pipelines:
branches:
master:
"STEPS TO BUILD AND TEST HERE"
pull-requests:
'**':
"STEPS TO BUILD AND TEST HERE"
However, this causes us to have two "STEPS TO BUILD AND TEST HERE" blocks which are the same and we would like to do something like:
pipelines:
branches:
master:
pull-requests:
'**':
"STEPS TO BUILD AND TEST HERE"
Would this be possible by any current means, or maybe is there a single trigger that could capture both conditions?
Thank you!
I don't know about an OR operator, but I think there is a better solution to the problem.
You could define your steps with YAML anchor, then refer to that anchor in both locations.
See: https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
Thanks you, this is what I was looking for!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.