I have a 2.0 build which runs successfully when triggered through a git commit. However, I am also trying to trigger the same build through the CircleCI API and receiving the error:
- Cannot find a job named
build
to run in thejobs:
section of your configuration file.
If you expected a workflow to run, check your config contains a top-level key called ‘workflows:’
There are similar posting on the forum however I haven’t found any with this specific scenario (working through git commit but failing through the API.
My config.yml has arbitrary job names and includes a workflows section:
version: 2
workflows:
version: 2
test:
jobs:
- test-1
- test-2
jobs:
test-1:
.
.
.
test-2:
.
.
.
I am using the following API request:
curl -X POST -u <token>: https://circleci.com/api/v1.1/project/github/<repo>/tree/master
Thanks