#StackBounty: #java #maven #continuous-integration #bamboo #git-flow Bamboo build plan on branches but not on develop

Bounty: 50

Context:

  • Bamboo 5.10.3
  • Gitflow branching strategy applied
  • We would like to have a certain behavior on feature branches, a different behavior on release and hotfix branches, and a third different behavior on the develop branch

Implemented (not working) approach:

  • Three different build plan
  • The first provides a regex in the “Branches” tab of the build plan (“Create plan branches for matching new branches) to only match feature and bugfix branches ((?=(feature.*|bugfix.*)).*$). Then it provides the desired behavior in its stages and jobs
  • The second one as above configured for release and hotfix branches ((?=(hotfix.*|release.*)).*$), then with its own behavior in stages
  • The third has the “Do not create plan branches” in its “Branches” control, that is, no branching, only for develop.

This works fine, each branch has its own build plan based on the desired behavior. However, when merging any branch into develop, the three build plan start in parallel, because the three of them have develop in their “Repositories” as original branch entry.

Question: how could this side effect be avoided? How could we specify a build plan for certain branch types only and not also for the original branch (in this case develop)?


I understand Bamboo needs an origin from which cloning new build plan for its branches according to a certain strategy (the regex), but how can we block it to run the build plan for the original branch as well? Or, can we define a build plan for a branch type independently than its origin and based on a dynamic name (e.g. feature-something, feature-bob)?

(On this last point: in “Repository” we can specify a branch as origin, but that’s a static value, we cannot put a regex there, which would fix the overall issue, I suppose)


Get this bounty!!!