I'm trying to reference ${bamboo.shortPlanBranchName} in my build plan
https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html.
It works for branches other than the default branch, but when running the default branch, it returns blank.
Hello garrellj,
Welcome to Atlassian community.
This is expected because this build will return the name for only Plan branches and not the default branch ( main branch ).
As per the description at Bamboo Variables
bamboo.shortPlanBranchName | The name of the current plan branch where the job is being run |
For the default branch if you need the same you can use
bamboo.planRepository.branchDisplayName | The name of the branch displayed in the branch details section. |
Regards,
Shashank Kumar
**please don't forget to Accept the answer if your query was answered**
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.