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

Branch trigger on pipelines

Felipe Oliveira
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!
January 26, 2024

Hello community! I have some doubts. I need to set up the trigger to run my pipeline on a specific branch, but despite inserting the code snippet below, it always runs. Is it possible to make this kind of configuration? How can I set it up so that it only runs on this branch? Thank you!

branches:
   only:
      - hml

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2024

Hi Felipe,

Welcome to the Bitbucket Cloud community! :)

The default tag configured in your YML config should be the only tag where builds will run upon every commit, regardless of the branch.

Limiting the builds to a singular branch (in this case, the master branch would look like this):

pipelines:
branches:
master:
- step:
name: 'Echo Message'
script: echo "Hello world!"

I would suggest double checking your YML config, and also reading our documentation for YML configuration below:

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

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

Atlassian Community Events