本文介绍了Cloud Container Builder,ZIP在1980年之前不支持时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以下教程.

使用Cloud Source存储库和Container Builder自动进行无服务器部署

但是我得到了下面的错误.

But I got the error below.

$ 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是最新版本.

I'm now trying to solve it. Do you have any idea? My gcloud is the latest version.

$ 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

在本教程中示例Google Cloud功能代码.

Sample google cloud function code on the tutorial.

#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压缩源文件夹.也许在你的东西.目录有损坏的日期?因此,将其移至源文件夹即可对其进行修复.

Container Builder tars your source folder. Maybe something in your . directory has corrupted dates? That's why moving it to the source folder fixes it.

这篇关于Cloud Container Builder,ZIP在1980年之前不支持时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 09:18