Bamboo variables starting with bamboo_ are not correctly inherited in Bamboo 12.x

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • 12.1.8
    • Affects Version/s: 12.1.6
    • Component/s: Builds, Deployments
    • None
    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      In Bamboo 12.0 and later a variable namespacing prevents variables that are explicitly named with a bamboo_ prefix (e.g., bamboo_MY_VARIABLE) from being automatically mapped to the shell environment. While Bamboo 10.x allowed "loose matching" where these variables were accessible via ${bamboo_MY_VARIABLE}{}, Bamboo 12.x requires the strict bamboo_ prefix (e.g., ${bamboo_bamboo_MY_VARIABLE}{}), breaking existing scripts and deployment plans that rely on the legacy inheritance logic.

      Steps to Reproduce

      1. Create a Build Plan or Deployment Project in Bamboo 12.x
      2. Define a variable with a name that starts with bamboo_, for example: bamboo_S3_BUCKET_NAME.
      3. Add a Script Task to the plan.
      4. In the script body, attempt to print the variable using the standard environment variable notation:
      echo "The bucket name is: ${bamboo_S3_BUCKET_NAME}"
      1. Run the plan and inspect the logs.

      Expected Results

      The variable should be inherited as an environment variable, and the log should display the value:

      The bucket name is: my-s3-bucket-value

      Actual Results

      The variable is not inherited, and the reference returns an empty string:

      The bucket name is:

      Workaround

      There are two available workarounds:

      • Option A (Recommended): Rename the variable in the Bamboo UI or Specs to remove the bamboo_ prefix (e.g., rename bamboo_S3_BUCKET_NAME to S3_BUCKET_NAME). Bamboo will then automatically inject it as bamboo_S3_BUCKET_NAME into the environment, maintaining compatibility with existing scripts.
      • Option B: Update all scripts to use the strict namespace prefix: ${bamboo_bamboo_S3_BUCKET_NAME}{}.

              Assignee:
              Victor Debone
              Reporter:
              Mahender Sadasiva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: