circleci-cli icon indicating copy to clipboard operation
circleci-cli copied to clipboard

Better error message when build using machine executor fails

Open teka23 opened this issue 4 years ago • 1 comments

What problem does this feature solve?:

Currently, CircleCI CLI does not support machine executor in local jobs. Currently, it throws the following errors. It would be great to have better handling when user tries to run machine executor.

machine: image: ubuntu-2004:202010-01:

====>> Spin up environment
Build-agent version  ()
Docker Engine Version: 19.03.13
Kernel Version: Linux 0dd54c0bd7d9 5.4.39-linuxkit #1 SMP Fri May 8 23:03:06 UTC 2020 x86_64 Linux
Starting container ubuntu-2004:202010-01
Warning: No authentication provided, using CircleCI credentials for pulls from Docker Hub.
  image cache not found on this host, downloading ubuntu-2004:202010-01

  Error pulling image ubuntu-2004:202010-01: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied... retrying
  image cache not found on this host, downloading ubuntu-2004:202010-01

machine: true:

Build-agent version  ()
Docker Engine Version: 19.03.13
Kernel Version: Linux 5b7a0847453b 5.4.39-linuxkit #1 SMP Fri May 8 23:03:06 UTC 2020 x86_64 Linux
Starting container circleci/buildpack-deps:latest-dind
latest-dind: Pulling from circleci/buildpack-deps
...
====>> Preparing environment variables
...
The redacted variables listed above will be masked in run step output.====>> Checkout code
Making checkout directory "/home/circleci/project"
Copying files from "/tmp/_circleci_local_build_repo" to "/home/circleci/project"
Error:
failed to copy files: chdir /tmp/_circleci_local_build_repo: no such file or directory

Provide an example:

It will check whether if the job is using machine executor, and throws error.

You cannot use the machine executor in local jobs. See more in https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally

teka23 avatar Nov 06 '20 03:11 teka23

Thak you. You saved me a lot of time.

NaGaii1994 avatar Nov 10 '22 18:11 NaGaii1994