How to define pipeline parameters in dynamic config

Hi

I need to set up a parameter using the dynamic config and set it equal to a value based on a script.

I could see in the Dynamic config documentation that it is possible to declare and define pipeline variables using the path-finder orb based on file changes. But it doesn’t really fit my needs, I don’t need to check what has changed and is overkilling having to use that orb for what I need.

Basically, I would need something like:

version: 2.1

# this allows you to use CircleCI's dynamic configuration feature
setup: true

orbs:
  continuation: circleci/continuation@0.1.2

define-pipeline-parameter:
  executor: node
  steps:
    # THIS doesn't rly exist, made it myself
    - set-param: |
        pipeline-param-1 $(echo git log and something else)
    - continuation/continue:
        configuration_path: generated_config.yml # use newly generated config to continue

workflows:
  setup:
    jobs:
      - define-pipeline-parameter

Then trigger a workflow or not based on pipeline-param-1.

How can I achieve that? Dynamic config sounds agreat concept by seems by the docs is chained to the “repo changes” concept.

PS: Ofc if I can do define a pipeline param as such, without using Dynamic config would be great too, but using the pipeline don’t think would do it. This pipeline is the outcome of a github pr

I have solved my issue using dynamic config.
Grabbed whatever data I needed,
Saved the data into a .json file

 echo "$PARAMETERS" >> "circle-ci-setup-parameters.json"

used the circleci/continuation@0.1.2 orb to pass the new defined parameter

      - continuation/continue:
          configuration_path: ./.circleci/continue_config.yml
          parameters: ./circle-ci-setup-parameters.json

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