[英]gcloud functions deploy ignores dot-files
我的項目文件夾如下:
.
├── main.py
├── .keys
main.py 打開並讀取.keys
的內容。
我將這個項目上傳到 GCP Functions,如下所示:
gcloud functions deploy my-function --entry-point func --project my-project --runtime python37 --timeout 30 --trigger-topic my-topic
我的.gcloudignore
是默認的:
# This file specifies files that are *not* uploaded to Google Cloud
# 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
node_modules
#!include:.gitignore
當我這樣做時, .keys
沒有上傳到我的 GCP function,因此代碼無法從中讀取。
如果.keys
也在你的.gitignore
中, gcloud
將不會上傳它。 您需要從.gcloudignore
中刪除#:include..gitignore
或從.gitignore
中刪除.keys
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.