Degraded performance Customers may experience intermittent errors using Community search. Our platform vendor is investigating.
It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I have a plan (based on master) which is configured to poll the repository for changes.
Currently i have manualy added an existing branch (develop) to the plan that will use the same configuration of the plan.
Im my use case, the feature branches should execute a slightly different build - hence the tasks are different. Since plan branches can't have different stages / jobs / tasks than the plan, i have decided to create another plan - just for feature branches.
Since feature branches are created on the fly, the plan is again based on the master plan.
I want that the plan will be triggered by polling the repository, but i only want the plan to be triggered for the feature branches - not the master branch.
If i don't create a trigger in the plan, i will need to manually create a trigger for every feature branch that will be detected by Bamboo - which is not feasable.
If i create a trigger for the plan, then any change to the master branch will trigger both the original plan and the feature branches plan which I also don't want.
Is there a way to overcome this?
If not - can a feature be added that you can configure stuff in the plan but tick a checkbox that will say to only apply this on plan branches?
Thanks,
Moti.
Hi Moti,
Thank you for your question.
I would suggest you on having a look at Bamboo Variables where you can check which branch the commit was originated from.
# please, create a new Script task in your plan and paste in the following: echo "bamboo.repository.branch.name: ${bamboo.repository.branch.name}"
Kind regards,
Rafael
Hi Rafael,
I am aware of Bamboo variables and also use them in my plans.
I'm not sure however how this helps my scenario - Assuming i want to use tasks rather than scripts - there is no option to define conditions for task execution as far as i know.
Also, since i want to use triggers (which are not able to use variables) that will only be applied on the branches without me having to set them manually for every branch - i don't see how that helps in this scenario also.
Thanks,
Moti.
Hi Moti,
You are able to use Bamboo variables as a parameter for different Task within Bamboo and as you have mentioned "...the feature branches should execute a slightly different build..." so you could you the branch variable and compare if that branch is the one to run a particular Task.
Imagine that you are running a Maven task, you could use the branch name as a Goal and make your xml to perform what is meant to do based on that branch/Goal.
Kind regards,
Rafael
Hi Rafael,
I am using bamboo variables in tasks, but how do i achieve this in a single plan:
master / develop / release branches should use "clean deploy" as maven goals while my feature branches should use "clean compile". how do i configure this using bamboo variables (without manually adding plan variables to feature branches)?
Thanks,
Moti.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreBamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.