【发布时间】:2019-11-08 01:22:49
【问题描述】:
gcloud app deploy 不断上传源目录中的所有文件,尽管我已使用.gcloudignore 文件明确排除它们。例如,虚拟环境文件夹env被上传,这会导致错误,因为部署包含超过10,000个文件。
我正在使用 Python 3.7 和 gcloud SDK 版本 251.0.0 在 Windows 10 下工作。我试过gcloud app deploy的beta版和普通版。
.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
#!include:.gitignore
我可以在带有--verbosity=info 标志的输出中看到它识别出.gcloudignore 文件,但随后它将env 文件夹上传到云存储。我希望这个文件夹被跳过。 Git 按预期工作。
【问题讨论】:
-
我认为您正在混合概念和文件。
.gitignore用于 Git 存储库,用于忽略文件,.gcloudignore用于忽略部署到 App Engine 的文件。你能告诉我们你的gcloudignore文件吗? -
@Mangu thx,这是一个错字。我相应地编辑了问题
-
您可以将您的
.gitignore文件添加到帖子中吗?
标签: python google-app-engine google-cloud-platform gcloud