Hello,
I have recently started using dynamic configs since there are multiple issues which this feature will fix in our ci.
The latest problem I am experiencing is that I am trying to pass a dynamic json object to the continuation/continue for example:
version: 2.1
setup: true
orbs:
continuation: circleci/continuation@0.2.0
jobs:
Execute_Workflow:
executor: continuation/default
steps:
- checkout
- run:
name: Trying to set a dynamic pipeline var
command: |
hash="a87joe90rqhidaids23" # just an example, hash will be generated based on more complex logic
echo "extra_parameters='{ \"backend_hash\"":" \"$hash\" }'" >> $BASH_ENV
source $BASH_ENV
echo $extra_parameters
- continuation/continue:
configuration_path: .circleci/config.packed.yml
parameters: |
$extra_parameters
workflows:
Execute_Workflow:
jobs:
- Execute_Workflow
The problem is I am getting the error PARAMETERS aren't valid json
in the setup phase in the continuation command.
If I were to use
parameters: |
{ "backend_hash": "a87joe90rqhidaids23" }
everything works as expected but as stated before a87joe90rqhidaids23
is generated dynamically.
Note that the following does not work either:
parameters: |
{ "backend_hash": "$PREVIOUSLY_EXPORTED_ENV_VAR" }
How could I bypass this?
Thanks in advance