栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

运行`gcloud app deploy`时如何忽略文件?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

运行`gcloud app deploy`时如何忽略文件?

tl; dr:您应该使用

.gcloudignore
文件,而不是
skip_files
中的文件
app.yaml

而前两个答案

skip_files
app.yaml
文件中使用。现在
.gcloudignore
使用
gclouddeploy
upload
命令创建一个。默认值取决于您使用的检测到的语言,但是会自动
.gcloudignore
在我的Python项目中找到以下语言:

# This file specifies files that are *not* uploaded to Google Cloud Platform # using gcloud. It follows the same syntax as .gitignore, with the addition of# "#!include" directives (which insert the entries of the given .gitignore-style# file at that point).## For more information, run:#   $ gcloud topic gcloudignore#.gcloudignore# If you would like to upload your .git directory, .gitignore file or files# from your .gitignore file, remove the corresponding line# below: .git .gitignore# Python pycache:__pycache__/

注意 :当两个命令都

skip_files
定义并且
.gcloudignore
同时存在时,这些命令将不起作用。skip_files
definition ofthe
app.yaml`参考中
未提及此内容。

gcloud
命令之间具有全球公认的标准似乎更好,并且
.gcloudignore
skip_files
仅在没有App
Engine时才有意义的相比,采用vs有意义。此外,它的工作原理很像
.gitignore
参考文件中提到的文件:

.gcloudignore的语法大量来自.gitignore的语法;有关完整参考,请参见https://git-
scm.com/docs/gitignore
或man gitignore。

https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/659705.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号