You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
A Stage in a Bamboo Build Plan contains a Source Code Checkout task which checks out code from one of the Bitbucket repository branches that is linked to the Bamboo Build Plan.
What specifically do I need to type or do in order to get the name of the repository branch that was checked out by the Source Code Checkout task?
I have typed
in a subsequent Task inside the same Stage in the same Build Plan, but this just prints out the name of the default branchName for the entire Build Plan, which is different from the specific branch that was just checked out by the specific Source Code Checkout task about which I need information.
You did not answer the question.. The line of code you gave only supplies information about the Plan-level links to repositories. By contrast, this question asks how to determine which of those repositories is checked out by a specific Source Code Checkout task in the specific Job. My question assumes you do not already know the answer. Your reply assumes that the script already knows the answer because if the script knows the value of the <position> variable, then the script practically knows the rest of the answer.
Can you suggest an approach that utilizes Job-and-Task-level variables?