You want to provide task configuration for one or more fields from an external source like a file:

Step-by-step guide

This can be achieved by means of the file:// protocol as of Tasks for AWS 2.14:

  1. Add the steps/tasks to provide the content as a file, e.g. by downloading a shared artifact, checking it out from a source code repository or fetching the content from an URL with a script (the example uses the cloudformation.parameters.json Bitbucket snippet).

  2. Reference the file URL as the only content from a subsequent task's input field, e.g. file://${bamboo.build.working.directory}/cloudformation.parameters.json.

Workaround for Tasks for AWS < 2.14.0

For previous versions, this can be partially worked around by injecting the field configuration as a Bamboo variable instead, which can currently be achieved via these apps:

The following steps are based on the Variable tasks for Bamboo app:

  1. Add the steps/tasks to provide the content as a file, e.g. by downloading a shared artifact, checking it out from a source code repository or fetching the content from an URL with a script (the example uses the cloudformation.parameters.json Bitbucket snippet).

  2. Install the Variable tasks for Bamboo app.

  3. Add a Variable File reader task to Get the full content of a file and inject it in a variable.


    1. Specify a variable name, e.g. cloudformation.parameters.
      (info) Bamboo adds the prefix bamboo, so this variable needs to be referenced as ${bamboo.cloudformation.parameters}.

    2. Specify the file provided in step 1. to read the content from.
      Local scope is sufficient for reusing the variable inside the same job. Read the inline help for details on Result or Plan/Deployment scoped variables.

  4. Reference the variable as the only content from a subsequent task's input field, e.g. ${bamboo.cloudformation.parameters}.

Limitation

 This workaround has the limitation that the included content cannot use Bamboo variables in turn, because Bamboo doesn't yet support nested/recursive expansion of variables
(see ).

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.


Related issues

https://utoolity.atlassian.net/browse/UAA-30