Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,397
Community Members
 
Community Events
184
Community Groups

Bitbucket pipelines - Logic OR multiple pipeline start conditions

Cezar Chirila
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 28, 2023

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!

1 answer

1 accepted

1 vote
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 28, 2023

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/

Cezar Chirila
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 28, 2023

Thanks you, this is what I was looking for!

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events