无效的云构建超时?

invalid cloud build timeout?

我们的构建需要 1 分钟到 15 分钟不等(monobuild 尚未并行化,因此它可能构建 8 个服务器或 1 个)。超时所以我将构建文件修改为

steps:
- name: gcr.io/$PROJECT_ID/continuous-deploy
  timeout: 1200s

我也 运行 这些命令(最后一个失败了,尽管我从另一个 post 那里得到了它,所以它以某种方式对他们有用)...

Deans-MacBook-Pro:orderly dean$ gcloud config set app/cloud_build_timeout 1250
Updated property [app/cloud_build_timeout].
Deans-MacBook-Pro:orderly dean$ gcloud config set builds/timeout 1300
Updated property [builds/timeout].
Deans-MacBook-Pro:orderly dean$ gcloud config set container/build-timeout 1350
ERROR: (gcloud.config.set) Section [container] has no property [build-timeout].
Deans-MacBook-Pro:orderly dean$

我收到以下错误,任何超过 10 分钟的内容在 google

上都是无效的
invalid build: invalid timeout in build step #0: build step timeout "20m0s" must be <= build timeout "10m0s"

为什么必须小于 10m0s?我真的需要我们的构建大约 20 分钟。

我正要去

谢谢, 院长

步骤的超时时间应小于或等于整个任务的超时时间。

将步骤级别的超时设置为 20 分钟会导致错误,因为整个任务的默认超时默认为 10 分钟。

避免这种情况发生的方法是将整个任务的超时设置为大于或等于特定步骤的超时。

我添加了一个关于如何定义它的小例子。

steps:
- name: gcr.io/$PROJECT_ID/continuous-deploy
  timeout: 1200s # Step Timeout

timeout: 1200s  # Full Task Timeout