# Continuation parameters w/ evaluated environmental variables

**URL:** <https://discuss.circleci.com/t/continuation-parameters-w-evaluated-environmental-variables/40256>\
**Category:** Build Environment\
**Tags:** circle-yml\
**Created:** [June 1, 2021, 9:00pm UTC](https://discuss.circleci.com/t/continuation-parameters-w-evaluated-environmental-variables/40256 "2021-06-01T21:00:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MobileVet](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mobilevet/32/27478_2.png) [@MobileVet](https://discuss.circleci.com/u/MobileVet)\
**Post date:** [June 1, 2021, 9:00pm UTC](https://discuss.circleci.com/t/continuation-parameters-w-evaluated-environmental-variables/40256/1 "2021-06-01T21:00:40Z")

</div>

I have a Setup step then generates some ENVs. I was expecting to pass this to the following config via the Configuration Orb. However, I am having trouble determining how to pass the ‘evaluated’ version of the ENVs within the parameter string. I have tried `$` and `{{ $ }}` syntax as well as leaving off the “” around the ENV. Trying `<<` throws a configuration error indicating they need to be escaped. That clearly means that isn’t evaluating the value…

 ![Screen Shot 2021-06-01 at 4.51.24 PM](https://global.discourse-cdn.com/circleci/original/3X/5/c/5c49df2557a86b78ab0a4d20ce13155ef6bcda4d.png)

When the string is evaluated and the `pipeline.parameters.buildNumber` is echoed in a subsequent **Job** , it just shows up as `$CIRCLE_BUILD_NUM`

---

<div class="post-metadata">

**Author:** ![Jaryt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/jaryt/32/24066_2.png) [@Jaryt](https://discuss.circleci.com/u/Jaryt)\
**Post date:** [June 2, 2021, 1:33pm UTC](https://discuss.circleci.com/t/continuation-parameters-w-evaluated-environmental-variables/40256/2 "2021-06-02T13:33:26Z")

</div>

Hi,

I believe I have responded to a team member of yours with the solution, but posting here too for visibility.

Currently, the `parameters` string’s values are not being evaluated. This is something I am looking into fixing. For now, we can echo those parameters into a json file in a `pre-step` before the orb command is called. The `pre-step` is neccesary because each job will spin up it’s own environment.

Here’s an example workflow:

```auto
workflows:
  setup:
    jobs:
      - continuation/continue:
          configuration_path: ".circleci/test.yml"
          parameters: /home/circleci/test.json
          pre-steps:
            - run:
                command: |
                  export TEST_ENV="hello world"
                  echo '{ "test-string": "'$TEST_ENV'" }' >> /home/circleci/test.json

```

Notice the triple quote (a ’ and ") before the EV is called. This is so that the echo command will evaluate the environment variable. Also, the destination must be something other than the default working directory (~/project) as the `continuation/continue` step calls the `checkout` command which will fail if the directory already exists.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 12, 2021, 1:33pm UTC](https://discuss.circleci.com/t/continuation-parameters-w-evaluated-environmental-variables/40256/3 "2021-06-12T13:33:58Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
