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

Built-in variables are not available as env. variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • None
    • None
    • None

      Consider following scenario:

      script.sh in my repo:

      echo $BAMBOO_BUILDNUMBER
      

      Bamboo plan consisting of a single ScriptTask, which calls 'script.sh' from my repo. What happens? AFAIK the BAMBOO_BUILDNUMBER will be blank, where we would, tfu, Jenkins users could expect that BAMBOO_BUILDNUMBER will be some #no.
      Note the $BAMBOO_BUILDNUMBER is environment variable, not the

      ${bamboo.buildNumber} 

      This is contrary to our 'casual' plan/global variables (user created), which are injected into environment. If you create plan variable "plan.variable = 50", then calling script containing

      echo $BAMBOO_PLAN_VARIABLE
      

      will result in displaying 50. At least AFAIK.

      Does it make sense?

            Unassigned Unassigned
            jdumay James Dumay
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: