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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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?

1 answer

I know it is old thread but is there any solution for this case?

I think about add some script as the first job in every plan which would check whether change was made in specific directory but this is really weird way. 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events