一次将所有依赖项安装一次,然后将它们用于所有下一个管道(每次不做NPM I)
是否可以一次安装node_modules,并保存这些文件,而不是再次执行NPM CI,NPX playwright I等命令?
我正在剧作家进行测试自动化,并开始在Gitlab上面对问题,当我安装其组件时,据我所知,剧作家的一边存在一些连接问题(根据错误代码),并且完整的管道失败了。我想以某种方式解决它。
我也知道,还有另一种解决该问题的方法,也许从一开始就将Docker Image与已安装的剧作家和其他事情一起使用。
伙计们,你能建议我什么?
is it possible to install node_modules with all dependencies one time and save these files, not doing npm ci, npx playwright i, etc commands again?
I'm doing test automation on playwright and started facing with problem on gitlab, when I'm installing its components, there are some connection problems(according to the error code) on playwright's side as I understand and full pipeline fails. I'd like to solve it somehow.
Also I know that there is another way to solve that problem, maybe use docker image with installed playwright and other things from the start.
What can you suggest me, guys ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个空闲的方法可能是使用
docker多阶段
构建以完成此操作。将执行npm i
的示例dockerfile附加,然后将静态文件复制到nginx
容器。Dockefile
您的CI可能会使用
您可以根据需要使用不同版本的Angular或NPM更改构建器阶段。
An idle way could be to use
docker multi stage
builds to get this done. Attaching a sample dockerfile that doesnpm i
then copy static files tonginx
container.Dockefile
Your CI might use
You can always change your builder stage with a different version of angular or npm as required.