Defining variables with “bamboo” prefix results in missing expected environment variable format

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 12.0.0
    • Affects Version/s: 8.2.5, 9.2.1, 11.0.1
    • Component/s: Builds
    • None
    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      When variable’s name already begins with bamboo, Bamboo does not prepend an extra "bamboo_" prefix, which causes the inconsistency.

      Steps to Reproduce

      1. Create variable that starts with bamboo i.e bambooBaseUrl. (can be Global/Project/Plan)
      2. Setup a plan with a single script task: "env | sort"
      3. A Dump variables to logs task will print out :
      build	01-Jul-2025 18:07:55	bamboo1GLOBAL_VARS=https://linux-105464.prod.atl-cd.net/bamboo
      build	01-Jul-2025 18:07:55	bamboo1PLAN_VARS=https://linux-105464.prod.atl-cd.net/bamboo
      build	01-Jul-2025 18:07:55	bamboo1PROJECT_VARs=https://linux-105464.prod.atl-cd.net/bamboo 

      Expected Results

      All variables to be prefixed consistently with bamboo_.

      Please, treat fix as a breaking change, with a corresponding release note update, since it may impact users relying on the existing behavior.

      Actual Results

      Task logs  for 11.0.1 (

      simple	01-Jul-2025 18:07:55	Build project1 - Variables - Default Job #4 (PROJ1-VAR-JOB1-4) is being prepared for building on agent localhost (3), bamboo version: 11.0.1
      simple	01-Jul-2025 18:07:55	Remote agent on host localhost
      simple	01-Jul-2025 18:07:55	Build working directory is /vagrant/agents/1101/xml-data/build-dir/PROJ1-VAR-JOB1
      simple	01-Jul-2025 18:07:55	Executing build project1 - Variables - Default Job #4 (PROJ1-VAR-JOB1-4)
      simple	01-Jul-2025 18:07:55	Running pre-build action: Build Log Labeller Pre Build Action
      simple	01-Jul-2025 18:07:55	Running pre-build action: VCS Version Collector
      simple	01-Jul-2025 18:07:55	Build project1 - Variables - Default Job #4 (PROJ1-VAR-JOB1-4) started building on agent 'localhost (3)' (Remote agent on host localhost)
      simple	01-Jul-2025 18:07:55	Starting task 'spit variables' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
      command	01-Jul-2025 18:07:55	Beginning to execute external process for build 'project1 - Variables - Default Job #4 (PROJ1-VAR-JOB1-4)'\n ... running command line: \n/vagrant/agents/1101/temp/PROJ1-VAR-JOB1-4-ScriptBuildTask-2237666917846793333.sh\n ... in: /vagrant/agents/1101/xml-data/build-dir/PROJ1-VAR-JOB1\n
      build	01-Jul-2025 18:07:55	AGENT_INIT_MEMORY=256
      build	01-Jul-2025 18:07:55	AGENT_MAX_MEMORY=512
      build	01-Jul-2025 18:07:55	ALLOW_EMPTY_ARTIFACTS=false
      build	01-Jul-2025 18:07:55	bamboo1GLOBAL_VARS=https://linux-105464.prod.atl-cd.net/bamboo
      build	01-Jul-2025 18:07:55	bamboo1PLAN_VARS=https://linux-105464.prod.atl-cd.net/bamboo
      build	01-Jul-2025 18:07:55	bamboo1PROJECT_VARs=https://linux-105464.prod.atl-cd.net/bamboo 

      Workaround

      Make sure no variables begin with/have "bamboo" prefix. 

       Alternatively, declaring a second variable with a forced "bamboo." prefix also helps:

      bambooBaseUrl=https://<baseUrl>
      bamboo.bambooBaseUrl=https://<baseUrl>
      

      Will create two variables, with the second one correctly following the desired variable prefix consistenly.

      build	16-Jul-2025 03:56:27	bambooBaseUrl=https://<baseUrl>/bamboo
      build	16-Jul-2025 03:56:27	bamboo_bambooBaseUrl=https://<baseUrl>/bamboo

            Assignee:
            Mateusz Szmal
            Reporter:
            Alex
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: