`circleci config validate` for continue_config.yml


I have been using circleci config validate to validate my CircleCI config.yml before pushing; but now that I moved to Dynamic config using the continue and path finder orbs + a continue_config.yml file…the command circleci config validate only checks the config.yml and not also the file that continues the main config.

How can I validate also the file that continues my config with that comand? is there any extra flag I can use ?
If not would be useful to make it work also with the continuation files

Hey Vanals,

I do not think this is strictly possible in all cases given the config you “continue” may not exist before your initial config runs. While your continue config may point to an existing file, it may also point to itself, or a file that has yet to be generated.

I would recommend running the circleci config validate for each separate config file you are able to.

Hi @KyleTryon , in my case the continue_config.yml does exist! is hardcode.
How can I run Circleci config validate for a specific config file? I guess that’s what I miss, cos feels like it just analyzes the main config.yml

Hey @Vanals
That is correct. There is nothing about your config that tells the validator that it should be accessing a second config file. The second config is triggered via an API, most often that API is triggered by the continue orb as part of the pipeline but it’s not a part of your config.yml

If you have a secondary config file pre-defined you would like to evaluate, you can still use the circleci validate command, just pass the yaml file to verify.

circleci config validate file1.yml
circleci config validate file2.yml

Thanks, I think I tried this way before but wasn’t working maybe because I wasn’t giving the full file paths

E.g: ./.circleci/fileName.

With the full path works :slight_smile:

1 Like

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