Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
91pratyush opened this issue Jul 18, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@91pratyush
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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

@91pratyush 91pratyush added the bug Something isn't working label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant