Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20668

Variable to get plan branch name

    XMLWordPrintable

Details

    • 2
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Problem

      The plan branch name could be retrieved from ${bamboo.shortPlanName} in the past, but after fixing https://jira.atlassian.com/browse/BAM-17810 this is no longer possible.
      The fix was correct, but it brought up another need for a Bamboo variable to provide the plan branch display name.

      None of the variables below can be used for this purpose:

      • bamboo_planRepository_branchName
      • bamboo_planRepository_1_branchDisplayName
      • bamboo_planRepository_branchName
        All the variables above will show what is configured in the repository section for the branch. if the branch is changed manually the display name will not be represented by them anymore.

      It would be good if we have a variable like bamboo_branchName which returns the current Plan branch name that the job is run, in the same way before the bug fix for bamboo.shortPlanName, or bamboo.planRepository.branchName without the need to add <position> but just the current branchName that the plan is run.

      Workaround (Partial)

      For script task on Linux
      Use bash substitution to get the branch display name from the bamboo_planName variable.

      bamboo_planBranchName = ${bamboo_planName##* - }
      

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              dsantos Daniel Santos
              Votes:
              28 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: