Creating a new workflow-based build via API mysteriously fails


#1

This build was triggered via the following script:

curl -X POST --header "Content-Type: application/json" -d "{ \"revision\": \"$rev\" }" \
    https://circleci.com/api/v1.1/project/github/ghc/ghc?circle-token=$token

It failed in the “environment spin-up” step with the following error

Build-agent version 0.0.4545-ba6be34 (2017-11-20T20:01:46+0000)
Configuration errors: 1 error occurred:

* Cannot find a job named `build` to run in the `jobs:` section of your configuration file.
If you expected a workflow to run, check your config contains a top-level key called 'workflows:'

Yet .circleci/config.yml most certainly does contain a top-level key called workflows. This can be confirmed by viewing the “Configuration” tab. Moreover, other builds of this same repository triggered by branch pushes complete successfully.


#2

Circle documentation, and many threads on this forum, state that there is no current support for kicking off a workflow via the Circle API.

Circle’s FAQ: https://circleci.com/docs/2.0/faq/#can-i-use-the-api-with-workflows

You may be gobsmacked by this information – many Circle customers are.


#3

Gobsmacked is a good word for it. Thanks for your help, @jaredrhine.


#4

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