difference between BranchName Vs Repository Branch name and how to get the variable name

Sughosh R February 9, 2020

what is the bamboo variable for the 

the branch name which is under plan configuration--> repository -->branch name 

 and the branch name which is getting build 

when we use  "${bamboo.repository.branch.name}" we get the branch name that is current being build by bamboo 

how to get the name which is under plan configuration under that  repository section and branch name under that.. 

1 answer

1 vote
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2020

@Sughosh R  Welcome to the community.

Variable you are looking for should be like this, "${bamboo.planRepository.branchName}"

Have a look at this for more details - https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html

Sughosh R February 10, 2020

Both  ${bamboo.repository.branch.name}" and  ${bamboo.planRepository.branchName}"

give the same result 

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2020

@Sughosh R  Can you try it with position, like this you can replace 1 here to see difference.

${bamboo.planRepository.1.branchName}
Sughosh R February 11, 2020

@DPKJ    All the below variables give the same value

Write-Host "repository.git.branch--> ${bamboo.repository.git.branch}"
Write-Host "planRepository.1.branchName--> ${bamboo.planRepository.1.branchName}"
Write-Host "repository.branch.name --> ${bamboo.repository.branch.name}"
Write-Host "planRepository.branchName--> ${bamboo.planRepository.branchName}"

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2020

@Sughosh R  Need to check on that.

Have you read the documentation link that I have given?

Vijay Reddy July 29, 2023

@DPKJ what If bamboo plan has multiple repo's , If I want to configure a branch plan that has multiple branches.

will this works?

${bamboo.relVer}-*.${bamboo.buildNumber}

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events