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

Allow nested/recursive expansion of variables in build invocation

    • 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.

      I have several build jobs that all share the same build invocation that contains several variables that are build agent capabilities. Whenever this invocation changes, I have to go and edit the many jobs that use it.

      What I would like to be able to do is defined the build invocation as a single global variable, that itself uses variables that are capabilities of the build agent. This would allow me to define the invocation in one place which would simplify maintenance.

      Another alternative would be to introduce build invocation templates that can be shared among jobs (across different plans). These templates could themselves have variables that could be unique to the job that must be configured there, which would allow the common parts of the invocation to be defined centrally yet still facilitate differences per job.

            [BAM-8266] Allow nested/recursive expansion of variables in build invocation

            Hello guys, we are releasing this feature in version 6.3. The EAP is out if you want check it out. You can grab it here. Just go to the Bamboo variables page to learn how to use it.

            If you need more information about EAP release you can find this page useful, but note EAP release notes doesn't include information about this feature.

            Grzegorz Lewandowski added a comment - Hello guys, we are releasing this feature in version 6.3. The EAP is out if you want check it out. You can grab it here . Just go to the Bamboo variables page to learn how to use it. If you need more information about EAP release you can find this page useful, but note EAP release notes doesn't include information about this feature.

            Ryan Daniels added a comment - If it can be done with a plugin, it should be simple to add this: https://marketplace.atlassian.com/plugins/net.collabsoft.plugins.bamboo.nestedVariables/server/overview

            Not having this simple feature makes our build configuration 3 time harder than it needs to be. Why has this not been implemented?

            Ryan Daniels added a comment - Not having this simple feature makes our build configuration 3 time harder than it needs to be. Why has this not been implemented?

            sadgit added a comment -

            It would be nice if it seemed like you cared. This is a real disadvantage compared with TeamCity and Jenkins.

            sadgit added a comment - It would be nice if it seemed like you cared. This is a real disadvantage compared with TeamCity and Jenkins.

            It seems like Atlassian is dropping Bamboo in favor of bitbucket pipelines. This ticket (open for years now) is an example of the lack of support for paying customers.

            With that said, I kept running into this issue and resolved it by writing python scripts checked into source. This is cumbersome and causes a lot of churn in the source code. I found an alternative that will let you write inline python scripts. Below is an over-simplified example. This would be used inside an inline shell script task:

            function get_version() {
            python - <<END
            import os
            
            release = os.environ['bamboo_deploy_release']
            version = release.split('-')[0]
            print(version)
            END
            }
            
            VERSION=$(get_version)
            echo $VERSION
            

            Nick Phillips added a comment - It seems like Atlassian is dropping Bamboo in favor of bitbucket pipelines. This ticket (open for years now) is an example of the lack of support for paying customers. With that said, I kept running into this issue and resolved it by writing python scripts checked into source. This is cumbersome and causes a lot of churn in the source code. I found an alternative that will let you write inline python scripts. Below is an over-simplified example. This would be used inside an inline shell script task: function get_version() { python - <<END import os release = os.environ[ 'bamboo_deploy_release' ] version = release.split( '-' )[0] print(version) END } VERSION=$(get_version) echo $VERSION

            Dmitriy added a comment -

            Looks like sales or top management are not checking feature request often.
            Sad, but we switched to jenkins instead of Bamboo because of only this missing feature.

            Dmitriy added a comment - Looks like sales or top management are not checking feature request often. Sad, but we switched to jenkins instead of Bamboo because of only this missing feature.

            We would really like to switch from Jenkins to Bamboo as we have JIRA, and the integration features rock.
            BUT: As long as you don't have this feature as part of the core (not as a plugin), we will not switch and will probably use TeamCity instead.

            Aren't you guys realizing that you are loosing customers? Why does this feature have minor prio?

            Deleted Account (Inactive) added a comment - We would really like to switch from Jenkins to Bamboo as we have JIRA, and the integration features rock. BUT: As long as you don't have this feature as part of the core (not as a plugin), we will not switch and will probably use TeamCity instead. Aren't you guys realizing that you are loosing customers? Why does this feature have minor prio?

            TeamCity does also support this out-of-the-box. We most likely will choose TC.

            Artyom Chernenko added a comment - TeamCity does also support this out-of-the-box. We most likely will choose TC.

            h17liner added a comment -

            Assignee: Unassigned
            Will wait next 5 years.

            So disappointed. Choose Jenkins. thx.

            h17liner added a comment - Assignee: Unassigned Will wait next 5 years. So disappointed. Choose Jenkins. thx.

            We want to override a custom variable "version" (1.1.1.0 for example) in a release brach in order to achieve something like "1.1.1.0RC${bamboo.buildNumber}". The idea is to obtain an incremental version number. Is any workaround to do this?

            Alberto Marín Linares added a comment - We want to override a custom variable "version" (1.1.1.0 for example) in a release brach in order to achieve something like "1.1.1.0RC${bamboo.buildNumber}". The idea is to obtain an incremental version number. Is any workaround to do this?

              glewandowski Grzegorz Lewandowski
              e76c8ebda36d Luke Daley
              Votes:
              136 Vote for this issue
              Watchers:
              78 Start watching this issue

                Created:
                Updated:
                Resolved: