gcloud app deploy始终上传源目录中的所有文件,尽管我已使用.gcloudignore文件明确排除了它们。例如,虚拟环境文件夹env已上载,这会导致错误,因为部署中包含的文件超过了10,000个。
我正在Windows 10下使用Python 3.7和gcloud SDK 251.0.0。我尝试了beta和正常版本的gcloud app deploy。
该.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
Run Code Online (Sandbox Code Playgroud)
我可以在带有--verbosity=info标志的输出中看到它识别出.gcloudignore文件,但是随后将env文件夹上传到Cloud Storage。我希望这个文件夹被跳过。Git按预期工作。