CircleCI-Public / continuation-orb

MIT License
12 stars 15 forks source link

Bug: Default parameter is not getting overridden in the continue config.yml #42

Open 91pratyush opened 4 months ago

91pratyush commented 4 months ago

Is there an existing issue for this?

Orb version

1.0.0

Current behavior

I have a dynamic config file in which I have a pipeline level parameter defined as :

parameters:
    skip_tests:
        type: boolean
        default: false

I have a continue config.yml in which I declare the same parameter, but with different default value :

parameters:
    skip_tests:
        type: boolean
        default: true

Expectation : The parameter value in dynamic config file should be honored since all parameters should be passed by default to the continue config.yml. Basically, if no parameters are passed in the parameters key, it should pass all parameters by default.

Behaviour : The parameter value in continue_config.yml is honored unless passed explicitly in parameters key.

Minimum reproduction config

config.yml :

version: 2.1
setup: true
orbs:
  continuation: circleci/continuation@1
parameters:
  skip_tests:
    type: boolean
    default: true
jobs:
  generate_dynamic_configuration:
    steps:
      - checkout
      - continuation/continue:
          configuration_path: .circleci/generated-config.yml

workflows:
  Generate Config:
    jobs:
      - generate_dynamic_configuration:
          name: Generate CI configuration

generated-config.yml :

version: 2.1
parameters:
  skip_tests:
    type: boolean
    default: false
jobs:
  run_tests:
    steps:
      - checkout
      - run:
          command: echo <<pipeline.parameters.skip_tests>>

workflows:
  Generate Config:
    jobs:
      - run_tests:
          name: Run tests

Expected behaviour : -- true Actual behaviour : -- false

Other

No response