Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-19448

Evaluate account variables referenced by repository variables

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

      Problem

      It can be quite useful to declare some general parameters in the global account a reference them in repository variables.

      If for instance, we declare the following ones in the account area:

      SERVICE_1_PORT=8080
      SERVICE_2_PORT=8081

       

      And then declare the following one in the repository area:

      THIS_SERVICE_PORT=$SERVICE_1_PORT

      The variable THIS_SERVICE_PORT will not have the value 8080, but the literal $SERVICE_1_PORT.

      Workaround

      Use the eval command to create a new variable with the correct value.

      e.g.

      - eval export SERVER_PORT=$THIS_SERVICE_PORT

            [BCLOUD-19448] Evaluate account variables referenced by repository variables

            There are no comments yet on this issue.

              Unassigned Unassigned
              dsantos Daniel Santos (Inactive)
              Votes:
              19 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: