Programmatically building a new job with a new config

I am programmatically creating a new CircleCI configuration file (to test a newly published Orb). I would like to execute a new job with the new configuration.

I have tried using:

  • orb-tools/local-test-build command
  • Manually invoked circleci local execute -c path/to/new/config.yml
  • Manually invoked circleci execute -c path/to/new/config.yml

However. it seems that none of these utility methods work.

Is the CLI suppose to support executing new jobs while in a CI job? I think I may be misunderstanding the use-cases for the CLI.


After re-reading the notes, there is a nugget of information with a link to an example.

A few things I have missed (and have been helped by others in PRs and in the example):.

  1. Job must be a machine executor – otherwise the docker daemon is not properly setup.
  2. You must install the latest circleci CLI – easiest way to do that is by using the circleci/circleci-cli orb.
  3. Make steps that executes the build with a processed configuration file:
- run: circleci config process config.yml > processed_config.yml
- run: circleci local execute -c processed_config.yml

The build is running – albeit some other errors that are probably related to my setup.

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