[英]mv: cannot stat 'coverage.txt': No such file or directory
I'm trying to setup Codecov in my repository.我正在尝试在我的存储库中设置 Codecov。 I'm trying to pass the Codecov reports through docker container.
我正在尝试通过 docker 容器传递 Codecov 报告。
Here is my Dockerfile这是我的 Dockerfile
FROM markadams/chromium-xvfb-js:7
WORKDIR /usr/src/app
CMD npm install && \
node_modules/.bin/ng build && \
node_modules/.bin/ng test --watch=false && \
node_modules/.bin/ng lint && \
mkdir -p shared && \
mv coverage.txt shared
The error which I get is this -我得到的错误是这个 -
mv: cannot stat 'coverage.txt': No such file or directory
You can check my repository here你可以在这里查看我的存储库
Thanks!谢谢!
If you want a file from your build directory to exist inside the image (and containers), you need to first copy the file into your image:如果您希望构建目录中的文件存在于映像(和容器)中,您需要先将该文件复制到您的映像中:
FROM markadams/chromium-xvfb-js:7
# add this next line
COPY . /usr/src/app
WORKDIR /usr/src/app
CMD npm install && \
node_modules/.bin/ng build && \
node_modules/.bin/ng test --watch=false && \
node_modules/.bin/ng lint
You are moving the coverage.txt to shared.您正在将coverage.txt 移动到共享。 Looking in your repository the file coverage.txt is inside shared.
查看您的存储库,文件coverage.txt 位于共享内部。
Therefor you need to do mv shared/coverage.txt shared
因此你需要做
mv shared/coverage.txt shared
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.