Locally run jobs with dynamic config setup in monorepo

I have a monorepo setup with Dynamic Config. Here is the directory structure:

  • monorepo
    • .circleci
      • config.yml
      • workflows.yml

I cannot pack/process this into one config.yml to be then able to run individual jobs locally. Any ideas?


CircleCI’s Dynamic Config isn’t designed for running individual jobs locally. However, there are workarounds for your monorepo setup:

Temporary Config Split: Create a separate .circleci/config.yml file for local development. This file can reference specific workflows from workflows.yml using the & syntax. This allows local execution but requires maintaining two configs.

Local Development Tools: Consider tools like Skaffold or Docker Compose. These tools can spin up environments that mimic your CI pipeline locally, allowing you to test individual jobs without modifying CircleCI configs.

I hope the solution may help you.

Do you have a working example of the temporary config split? As I understand, you cannot alias between YAML files.

I don’t think that Dockers is a viable solution since I cannot reproduce the circleci agent actions which is where I see most issues.