It has not been copied .* files of the project by cp command in checkout phase of local build.
I need copying hidden files like .babelrc to build successfully.
Also I hope to not copy local caches generated without using docker.
In my project, yarn is used and install binary files each os.
Therefore, the build fails to copy local caches like node_modules.
If you don’t specify the files (i.e. replace /tmp/_circleci_local_build_repo/* with /tmp/_circleci_local_build_repo this should copy all of your hidden files.
The processing is executed in checkout phase of local build.
I think the script is in docker image of circleci, so I can not replace them.
I am sorry if it is a wrong idea.
I think that the updates include to change the way of deploying local project files to a docker container.
In building using docker in local, the circleci cli or its docker image mounts current project directory to /tmp/_circleci_local_build_repo in docker container, and copy files to work_directory and build and test by steps not to influence local files outside the container. I expected it to be happening from the next log.
I tried to search where it executed, but I could not find in /usr/local/bin/circleci as script. I think the script is in circleci/picard of docker image. Maybe I can not modify the script, so please tell me the resoltion to copy hidden files.
I just pushed the fix. Can you run circleci update and try again? As you are probably aware, we changed the way to handle local checkout. It used to be directly mounting the current directory to working_directory but now we first mount to /tmp/_circleci_local_build_repo and copy file contents to working_directory. The problem was * wasn’t expanded to hidden files. The change was made in order to handle when ~ is specified in working_directory. (~ didn’t work because Docker refuses ~ in bind mount dest).
Regarding the rash of "Permission denied"s cited by others, it seems we need to ensure all files up and down the directory structure from where we type circleci build are world readable.
====>> Checkout code
#!/bin/sh
mkdir -p /root/ferry-app && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/workspace
cp: cannot stat '/tmp/_circleci_local_build_repo/.': No such file or directory
Error: Exited with code 1
Step failed
Task failed
/bin/sh: pkill: command not found
/bin/sh: pgrep: command not found
circleci version: 0.0.5609-e7533b7
OS: mac OS High Sierra
Same here…
====>> Checkout code
#!/bin/sh
mkdir -p /home/circleci/app && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/app
cp: cannot stat ‘/tmp/_circleci_local_build_repo/./.git/info/exclude’: No such file or directory
cp: cannot stat ‘/tmp/_circleci_local_build_repo/./.git/description’: No such file or directory
cp: cannot stat ‘/tmp/_circleci_local_build_repo/./.git/hooks’: No such file or directory
There was an unrelated regression introduced ~11 days ago, but fixed the following day. Anyone seeing issues should circleci update again. If you are seeing issues on 0.0.5763-f6bc418 (currently latest), please include version details and error output.
Same issue here.
====>> Spin up Environment
Build-agent version 0.0.5895-01cdb92 (2018-05-29T20:07:10+0000)
Starting container circleci/buildpack-deps:latest-dind
using image circleci/buildpack-deps@sha256:f9dea38e6583c663bbe2d950b8c9abdb771f9dd587fdb18460da2f4253c3a70a
====>> Checkout code
#!/bin/sh
mkdir -p /home/circleci/code && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/code
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/code/app/build/reports to reports
No artifact files found at /home/circleci/code/app/build/reports
Task failed
Seems like the ‘Checkout’ command is barfing. I spliced in a sanity check command to just list whether a file existed in my repo, and it fails outright. Digging a bit further, a command ran ‘ls’ and the output seems to indicate perhaps the working_directory field is being ignored?
Sure enough, running the build remotely displays the correct folder contents.