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

Is there anything similar to Plan Branches for BitBucket Cloud/Pipelines?

Noel G March 25, 2022

In Server/DC version we have this nice feature we use a lot for some use cases.

Each time a developer creates a feature branch in BitBucket, a corresponding Build plan is automatically created in Bamboo feeding from the newly created branch.

The developer can then run a personal build with their feature branch code before integrating it with the team's work.

I cannot find any similar automation in BitBucket Cloud pipelines, at least out of the box.

Can anyone help please?

 

Thank you!

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 28, 2022

Hi @Noel G and welcome to the community!

One option is to use a default pipeline in your bitbucket-pipelines.yml file as follows

pipelines:
default:
- step:
script:
- <command here>
- step:
script:
- <command here>

If you have such a configuration in the bitbucket-pipelines.yml file of the main branch of the repo, then every time someone creates a new branch out of the main one, this pipeline will run for that branch as well.

If you prefer to specify branch names in bitbucket-pipelines.yml or if the build running for the branches created out of the main one should be different, you can extend the branches definition to take into account these branches as well.

E.g. if your main branch is called main, and the branches the developers create out of main have the prefix feature/, then the bitbucket-pipelines.yml file could look as follows:

pipelines:
branches:
main:
- step:
script:
- <command here>
feature/*:
- step:
script:
- <a different command here>

Does either of these options work for you?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events