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

Custom plan variables do not seem to resolve to their values consistently when generating a release

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 5.1
    • 5.0, 5.0.1
    • Deployments

      I have plan variables to store the major and minor versions separately, as our deploy scripts handle major and minor upgrades differently, and the variables only seem to resolve to their value half of the time when generating a new release. Funny thing is, the variables always seem to work right when I click preview on the Release Versioning page.

      To reproduce, add a variable to plan, say build.foobar = works, run the plan and then attempt to make a release out of it using the variable ${bamboo.build.foobar} in the release name. It will work in the preview, but it will frequently not work when generating the release. As far as I can tell there is nothing different happening when it works vs. when it doesn't.

            [BAM-13549] Custom plan variables do not seem to resolve to their values consistently when generating a release

            cnavarro
            Thank you for confirming this!

            Marcin Gardias added a comment - cnavarro Thank you for confirming this!

            Yes, that does seem to be the pattern. I just did a quick test of four different builds: two that were triggered automatically and two that were triggered manually. Those builds that were triggered manually resulted in releases where the variables were properly resolved. Those builds that were triggered automatically resulted in releases where the variables were not properly resolved.

            Cat Navarro added a comment - Yes, that does seem to be the pattern. I just did a quick test of four different builds: two that were triggered automatically and two that were triggered manually. Those builds that were triggered manually resulted in releases where the variables were properly resolved. Those builds that were triggered automatically resulted in releases where the variables were not properly resolved.

            cnavarro

            Four out of five times the variables will remain not be substituted

            Is it possible that the pattern here is that it doesn't work when build is triggered automatically (repository polling, scheduled build) and it works only when build is triggered manually?

            Marcin Gardias added a comment - cnavarro Four out of five times the variables will remain not be substituted Is it possible that the pattern here is that it doesn't work when build is triggered automatically (repository polling, scheduled build) and it works only when build is triggered manually?

            Currently, our releases are being generated manually. From a given build (typically the last successful build), we select “Create Release”.

            There seems to be no clear pattern for when the variables are substituted or not. Four out of five times the variables will remain not be substituted (forcing us to manually rename the release). We’ve tried several variations of the same variable name finally settling on the following string: ${bamboo.build.version.major}.${bamboo.build.version.minor}.${bamboo.build.version.build}.${bamboo.planRepository.revision}. Typically, “bamboo.planRepository.revision” will be substituted correctly while the remaining three variables do not. It should be noted that we have the remaining three variables defined with constant values in the Variables tab under Plan Configuration. For example, we have created key “bamboo.version.major” and set it to 2013.

            Cat Navarro added a comment - Currently, our releases are being generated manually. From a given build (typically the last successful build), we select “Create Release”. There seems to be no clear pattern for when the variables are substituted or not. Four out of five times the variables will remain not be substituted (forcing us to manually rename the release). We’ve tried several variations of the same variable name finally settling on the following string: ${bamboo.build.version.major}.${bamboo.build.version.minor}.${bamboo.build.version.build}.${bamboo.planRepository.revision}. Typically, “bamboo.planRepository.revision” will be substituted correctly while the remaining three variables do not. It should be noted that we have the remaining three variables defined with constant values in the Variables tab under Plan Configuration. For example, we have created key “bamboo.version.major” and set it to 2013.

            PiotrA added a comment -

            Hello Sean,

            May I ask how are your releases being generated? Do you create them manually, or maybe they are created by some Trigger ("Scheduled"? "After successful Plan"?)?

            The reason I ask is that I'm trying to replicate the issue locally and any hints regarding how to set up my environment would be helpful. Have you spot any patterns as to when the variables get substituted and when not? I expect you haven't, but I thought I'd better ask anyway.

            regards!

            PiotrA added a comment - Hello Sean, May I ask how are your releases being generated? Do you create them manually, or maybe they are created by some Trigger ("Scheduled"? "After successful Plan"?)? The reason I ask is that I'm trying to replicate the issue locally and any hints regarding how to set up my environment would be helpful. Have you spot any patterns as to when the variables get substituted and when not? I expect you haven't, but I thought I'd better ask anyway. regards!

            Thanks Sean. Ill have a developer on our bug fix stream to take a look at this.

            James Dumay added a comment - Thanks Sean. Ill have a developer on our bug fix stream to take a look at this.

              Unassigned Unassigned
              0b35d968dd3e Sean O'Connor
              Affected customers:
              2 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: