CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
404 stars 233 forks source link

unable to execute local job on mac m1 pro #963

Closed ruirodrigues-eyenov closed 11 months ago

ruirodrigues-eyenov commented 11 months ago

Meta:

CircleCI CLI Version: 0.1.27054+68a3d97 (homebrew)

Operating System: Mac M1 pro

CircleCI CLI Diagnostic:

---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /Users/rui/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
OK, got a token.
Trying an introspection query on API...
Ok.

Current behavior:

Trying to execute local job with

circleci local execute test

with a config as simple as:

version: 2.1
jobs:
  test:
    macos:
      xcode: 14.3.1
    steps:
      - run: echo running

workflows:
  test:
    jobs:
      - test

and I get this message:

Build-agent version  ()
Creating a dedicated VM with xcode:14.3.1 image
Error: We had an unexpected error preparing a VM for this build, potentially due to our infrastructure or cloud provider.  Please retry the build in a few minutes

Error: 
Unexpected environment preparation error: failed to create host: remote docker is not available on this installation

Step failed
Task failed
Error: Unhandled prepare executor error: failed to create host: remote docker is not available on this installation

Expected behavior:

Run the job locally

When did this begin / Was this previously working?:

First time trying this so I never got it executing.

Additional Information:

loderunner commented 11 months ago

Unfortunately, only docker executor jobs can be run locally. From the CLI docs:

You cannot use the machine executor in local jobs. This is because the machine executor requires an extra VM to run its jobs.

A job with the macos property is implicitly a machine executor job (as are jobs with the machine property). Find out more about executor types in the config reference.

ruirodrigues-eyenov commented 11 months ago

Thanks for the reply @loderunner, I actually read that part but didn't connect the dots on that one. Can I suggest making the error clear?