For example, by branch name you might want to execute different tasks (regress testing in release branches instead of massive integration tests for example).
Is there a mechanism to do that in Bamboo's UI?
I don't know if there is some GUI way to do this
I am triggering the same plan in different ways from a REST request by using a variable
To do this
myvariablebamboo.variable.myvariable to the value required ie "1" or "2"$bamboo_myvariable for instanceif [ "$bamboo_myvariable" == "1" ]; then
# stuff to do variation 1
fi
if [ "$bamboo_myvariable" == "2" ]; then
# suff to do variation 2
fi
If you want to alter behaviour by branch there are variables such as "bamboo_planRepository_1_branch" which are available by default and could be used ina similar way
Atlassian Labs have now provided this functionality as an add-on: https://marketplace.atlassian.com/apps/1219706/conditional-tasks-for-bamboo?hosting=server&tab=overview
Only available for versions 6.7.1+
Update:
This add-on is only supported up to Bamboo 7.0.6 and conditional tasks are a standard feature in Bamboo 7.1+
https://confluence.atlassian.com/bamboo/bamboo-7-1-release-notes-1013854809.html