Not copied hidden files on local build by circleci cli

yup, same error here…

circleci local execute --job test3
Docker image digest: sha256:525c91e01875050fbf65cdb4bc83a45744c54f9027fa05f76f88713f3d37f4e3
====>> Spin up Environment
Build-agent version 0.0.7725-9681bc36 (2018-08-09T15:10:50+0000)
Starting container circleci/buildpack-deps:latest-dind
  using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1537541731
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=test3
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=https://github.com/gsaslis/porta
  CIRCLE_SHA1=f7419a0647fbcab80808c1ce0f4c3f2f84119484
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1537541731
  CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
  #!/bin/bash -eo pipefail
mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project
cp: cannot stat '/tmp/_circleci_local_build_repo/.': No such file or directory
Error: Exited with code 1
Step failed

also:

circleci version
0.1.2347+39dfda0

same problem:
====>> Checkout code
#!/bin/bash -eo pipefail
mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project
cp: cannot stat ‘/tmp/_circleci_local_build_repo/.’: No such file or directory
Error: Exited with code 1
Step failed
Error: runner failed
Task failed

Same problem.

Docker image digest: sha256:3d88cfffd448da07ff8ced22ccdca5adc09ff18e87dc7db9b8af5b8a47647c08

====>> Spin up Environment
Build-agent version 0.1.750-336e0196 (2018-09-13T19:48:06+0000)
Starting container circleci/buildpack-deps:latest-dind
using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a

Using build environment variables:
BASH_ENV=/tmp/.bash_env-localbuild-1541033905
CI=true
CIRCLECI=true
CIRCLE_BRANCH=3.6.1
CIRCLE_BUILD_NUM=
CIRCLE_JOB=build_linux_
CIRCLE_NODE_INDEX=0
CIRCLE_NODE_TOTAL=1
CIRCLE_REPOSITORY_URL=git@github.com:chrisdembia/simbody-feedstock.git
CIRCLE_SHA1=311553a13ff13c24e37b442c764e34dc0797117f
CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1541033905
CIRCLE_WORKING_DIRECTORY=~/test

====>> Checkout code
#!/bin/bash -eo pipefail
mkdir -p /home/circleci/test && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/test
cp: cannot stat ‘/tmp/_circleci_local_build_repo/.’: No such file or directory
Error: Exited with code 1
Step failed
Error: runner failed
Task failed
17:58 ~/r/s/simbody-feedstock (3.6.1=) circleci update
Already up-to-date.
1

1 Like

same problem for me…

$ circleci local execute --job e2e_tests

Docker image digest: sha256:783916ea6c381f701386ab73a52ff3962f689b7871210b3cacb62c5dd153934f

====>> Spin up Environment

Build-agent version 0.1.1480-7a5183d3 (2019-01-22T18:14:45+0000)

Starting container circleci/buildpack-deps:latest-dind

using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a

Using build environment variables:

BASH_ENV=/tmp/.bash_env-localbuild-1548337726

CI=true

CIRCLECI=true

CIRCLE_BRANCH=organizeDBMigrate

CIRCLE_BUILD_NUM=

CIRCLE_JOB=e2e_tests

CIRCLE_NODE_INDEX=0

CIRCLE_NODE_TOTAL=1

CIRCLE_REPOSITORY_URL=git@github.com:MountSinaiHealthSystem/MountSinaiConsumer.git

CIRCLE_SHA1=8091b74ca60c841d52cbadf8735a35374dac4f65

CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1548337726

CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code

#!/bin/bash -eo pipefail

mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project

cp: cannot stat ‘/tmp/_circleci_local_build_repo/.’: No such file or directory

Error: Exited with code 1

Step failed

====>> Uploading artifacts

Uploading /home/circleci/project/webui/tmp/screenshots to home/circleci/project/webui/tmp/screenshots

No artifact files found at /home/circleci/project/webui/tmp/screenshots

====>> Run Chat Service Tests

#!/bin/bash -eo pipefail

source /home/circleci/.gvm/scripts/gvm && gvm use go1.11.2 --default && cd chat_service && env $(cat …/ci.env | xargs) go test ./… -v

/bin/bash: /home/circleci/.gvm/scripts/gvm: No such file or directory

Error: Exited with code 1

Step failed

Error: runner failed

{“Runner”:true,“level”:“error”,“msg”:“runner failed”,“task-id”:“localbuild-1548337726”,“time”:“2019-01-24T13:48:50Z”}

Task failed

Error: task failed

I think I’m running into the same thing. Here’s the command and error output:

 $ circleci local execute --job setup_test_and_lint
Docker image digest: sha256:acfd76fe37b40cfe630db648d3957646a95c0d03245c4a8f518d4ed5fce5f6b9
====>> Spin up Environment
Build-agent version 1.0.8197-1e6479d6 (2019-02-27T18:44:44+0000)
Starting container circleci/buildpack-deps:latest-dind
  using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1551387083
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=setup_test_and_lint
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=git@github.com:lantius/tilegames.git
  CIRCLE_SHA1=008867d44bea1457e25f52d81d505c238f959f56
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1551387083
  CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
  #!/bin/bash -eo pipefail
mkdir -p /home/circleci/project && cd /tmp/_circleci_local_build_repo && git ls-files -z | xargs -0 tar -c | tar -x -C /home/circleci/project
/bin/bash: line 0: cd: /tmp/_circleci_local_build_repo: No such file or directory
Error: Exited with code 1
Step failed
====>> Uploading artifacts
Uploading /home/circleci/project/htmlcov to home/circleci/project/htmlcov
  No artifact files found at /home/circleci/project/htmlcov
Error: runner failed
{"Runner":true,"level":"error","msg":"runner failed","task-id":"localbuild-1551387083","time":"2019-02-28T20:51:27Z"}
Task failed
Error: task failed

Here’s my config.yml:

version: 2
runtime: python
env: flex

runtime_config:
    python_version: 2

jobs:
  setup_test_and_lint:
    machine: true
    environment:
      APPENGINE_PATH: /home/circleci/google_appengine
    dependencies:
      pre:
        - pip install --upgrade pip
    steps:
      - checkout
      - run:
          name: build_environment
          command: |
            echo 'export PATH=$APPENGINE_PATH:$PATH' >> $BASH_ENV
            source $BASH_ENV
            curl -o $HOME/google_appengine.zip https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.61.zip
            unzip -q -d $HOME $HOME/google_appengine.zip
            pip install coverage
            pip install -Iv pylint==1.9.2
      - run:
          name: run_tests
          command: |
            python run_tests.py
            ./coverage.sh
      - run:
          name: run_lints
          command: |
            python run_lints.py
      - store_artifacts:
          path: htmlcov

workflows:
  version: 2
  setup_test_and_lint:
    jobs:
      - setup_test_and_lint

I am also facing same issue.

$ circleci version
0.1.5432+9ea4b64

Command:

$ circleci local execute --job build
Docker image digest: sha256:627a3ccc6a69281fc4c8a69b39f156d45c3e2ccafbb6323414688ba02424c5c4

====>> Spin up Environment
Build-agent version 1.0.8534-fa52d0c9 (2019-03-04T10:32:10+0000)
Starting container circleci/buildpack-deps:latest-dind
using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a

Using build environment variables:
BASH_ENV=/tmp/.bash_env-localbuild-1551891039
CI=true
CIRCLECI=true
CIRCLE_BRANCH=circleci_2
CIRCLE_BUILD_NUM=
CIRCLE_JOB=build
CIRCLE_NODE_INDEX=0
CIRCLE_NODE_TOTAL=1
CIRCLE_REPOSITORY_URL=git@github.com:gautamrege/ffd.git
CIRCLE_SHA1=9d5d63de774a7e166430628aa87ebef408592d5b
CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1551891039
CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
#!/bin/bash -eo pipefail
mkdir -p /home/circleci/project && cd /tmp/_circleci_local_build_repo && git ls-files -z | xargs -0 tar -c | tar -x -C /home/circleci/project && cp -a /tmp/_circleci_local_build_repo/.git /home/circleci/project
/bin/bash: line 0: cd: /tmp/_circleci_local_build_repo: No such file or directory
Error: Exited with code 1
Step failed
Error: runner failed
{“Runner”:true,“level”:“error”,“msg”:“runner failed”,“task-id”:“localbuild-1551891039”,“time”:“2019-03-06T16:50:43Z”}
Task failed
Error: task failed

Has anybody who did run this successfully?

Same issue.

Version:

$ circleci version
0.1.5490+82d3083

Log:

$ circleci local execute --job build
Docker image digest: sha256:3d88cfffd448da07ff8ced22ccdca5adc09ff18e87dc7db9b8af5b8a47647c08
====>> Spin up Environment
Build-agent version 0.1.750-336e0196 (2018-09-13T19:48:06+0000)
Starting container circleci/buildpack-deps:latest-dind
  using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1553110427
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=build
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=git@github.com:magrathealabs/softplan-connectors-serverless.git
  CIRCLE_SHA1=b621912da89ff358fa275c7a4a1c3456b258edfb
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1553110427
  CIRCLE_WORKING_DIRECTORY=~/softplan-connectors

====>> Checkout code
  #!/bin/bash -eo pipefail
mkdir -p /home/circleci/softplan-connectors && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/softplan-connectors
cp: cannot stat '/tmp/_circleci_local_build_repo/.': No such file or directory
Error: Exited with code 1
Step failed
====>> Uploading artifacts
Uploading /home/circleci/softplan-connectors/coverage to home/circleci/softplan-connectors/coverage
  No artifact files found at /home/circleci/softplan-connectors/coverage
Error: runner failed
Task failed

cp: cannot stat ‘/tmp/_circleci_local_build_repo/.’: No such file or directory
Error: Exited with code 1

This might not be problems.
Simply, docker images does NOT have /tmp directory.

I try to change images which has /tmp directories is in success.

FYI

add this job before - checkout.

      - run:
          command: |
            if [[ ${CIRCLE_SHELL_ENV} =~ "localbuild" ]]; then
              mkdir -p /tmp
            fi

This doesn’t work, you still get no such file or directory for /tmp/_circleci_local_build_repo/, if you instead mkdir -p the whole path /tmp/_circleci_local_build_repo/ then you get a repo not found error from the git ls-files instead.

For me adding this code worked:

  - run:
      command: |
        if [[ ${CIRCLE_SHELL_ENV} =~ "localbuild" ]]; then
          mkdir -p /tmp/_circleci_local_build_repo
          cd /tmp/_circleci_local_build_repo
          git init
        fi

but that’s not a solution, as checkout step seems to be just coping that directory… so there’s no git repository content

Ok, I figured it out - In my case the isssue was caused by using machine executor, that’s not supported

Try to remove circleci/picard docker image and restart the job.