Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trigger branch-plan only on changes in specific repository sub-folder


I have the following problem and can't find any solution for it:

Our repository contains multiple C# Solutions and we are using pull-requests to bring new code into develop/master.

The target I want to achieve is the following:

  • Multiple builds, one for each solution inside the repository
  • A build is only triggered, if where are changes inside the solution sub-folder
  • When someone pushes a feature-branch and creates a pull-request, all build for all Solutions with changes are triggered and executing the UnitTests for these solutions

I configured my default-plan as follow:

  • The repository is set to our repository on the Bitbucket-Server, default branch is develop
  • In the repository settings I added "Change detection options" and add a RegEx to the Subfolder of Solution 1
  • Trigger of the default-plan is set to "Bitbucket Server repository triggered", using the repository settings described above
  • The branches options are configured to create a new plan "When new branch in repository is created"
  • The triggers of the branch-plan is set to "Same as defined in parent plan"

I expect the following:

  • A developer wants to bring a new feature containing changes for Solution 1 into develop and creates a pull-request
  • The feature-branch is pushed to server and a pull-request will be created
  • As there are changes in Solution 1, the build for Solution 1 is triggered, the build for Solution 2 NOT
  • After the build and all tests of Solution 1 are passed, the pull-request can be merged

Unfortunately it doesn't work as I expect, because on branch-plan creation (at the moment the feature-branch is pushed to the repository), the branch-plan build is triggered, doesn't care if where are changes in Solution 1 or not.

When the developer pushes new changes in the existing branch, it works as I defined and expected (so only changes in Solution 1 triggers the build), but this first build on branch-plan creation is a problem I can't solve... is where some solution how I can handle this?

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

171 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you