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!
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.