Cannot find a job named `build` to run in the `jobs:` section of your configuration file - again

I am completely new to circleci, but our expert has left our company. I’m trying to debug our script by running it locally. This is the original. Becasue it is version 2.1 it won’t run locally

version: 2.1
executors:
  mac_exe:
    macos:
      xcode: "10.1.0"
  linux_exe:
    docker:
      - image: gcr.io/rmx-staging/circleci:0.0.13
  elm_exe:
    docker:
      - image: gcr.io/rmx-staging/elm:0.19.1

jobs:
  side_chain_tests:
    ...

workflows:
  build_and_test:
    jobs:
      - side_chain_tests
      - side_chain_build
      - elm_runtime_build
      - web_upload_assets:
          requires:
            - side_chain_build
            - elm_runtime_build
      - web_release:
         filters:
           branches:
             only: master
         requires:
           - side_chain_tests
           - web_upload_assets

Folowing the cli instructions I did

circleci config process .circleci/config.yml> .circleci/config2.yml
circleci build --config .circleci/config2.yml

But that gives me

Docker image digest: sha256:6331ae078d92837f2513d5aca3f6344189531ab1bdf79bd7231392c7a4b0aa45

====>> Spin up Environment

Build-agent version 1.0.10191-59d6c584 (2019-04-04T09:13:55+0000)

Error: 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:'

Step failed

Task failed

Error: 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:'

circlecli2.yml concludes with

workflows:
  build_and_test:
    jobs:
    - side_chain_tests
    - side_chain_build
    - elm_runtime_build
    - web_upload_assets:
        requires:
        - side_chain_build
        - elm_runtime_build
    - web_release:
        filters:
          branches:
            only: master
        requires:
        - side_chain_tests
        - web_upload_assets
  version: 2

What could I do next?

1 Like

Try to specify the name of your job:

circleci build --config .circleci/config2.yml --job side_chain_tests