我正在尝试以下教程。
Automatic serverless deployments with Cloud Source Repositories and Container Builder
但是我得到了下面的错误。
$ gcloud container builds submit --config deploy.yaml .
BUILD
Already have image (with digest): gcr.io/cloud-builders/gcloud
ERROR: (gcloud.beta.functions.deploy) Error creating a ZIP archive with the source code for directory .: ZIP does not support timestamps before 1980
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/gcloud" failed: exit status 1
我现在正在尝试解决它。你有什么主意吗?我的 gcloud 是最新版本。
$ gcloud -v
Google Cloud SDK 193.0.0
app-engine-go
app-engine-python 1.9.67
beta 2017.09.15
bq 2.0.30
core 2018.03.09
gsutil 4.28
教程中的示例谷歌云函数代码。
#index.js
exports.f = function(req, res) {
res.send("hello, gcf!");
};
#deploy.yaml
steps:
- name: gcr.io/cloud-builders/gcloud
args:
- beta
- functions
- deploy
- --trigger-http
- --source=.
- --entry-point=f
- hello-gcf # Function name
#deploying without Cloud Container Builder is fine.
gcloud beta functions deploy --trigger-http --source=. --entry-point=f hello-gcf
最佳答案
Container Builder 将您的源文件夹打包。也许你的 .目录有损坏的日期?这就是将它移动到源文件夹修复它的原因。
关于google-app-engine - Cloud Container Builder,ZIP不支持1980年之前的时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49297234/