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

Why is the default variable bamboo.shortPlanBranchName blank

garrellj
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 1, 2024

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.

1 answer

1 vote
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 1, 2024

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**

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events