My gcloud build will timeout if left at the default timeout of 10 minutes, so I have tried to increase the timeout to 20 minutes. This is my cloudbuild.yaml.
# cloudbuild.yaml
steps:
- name: node:14.17.1
entrypoint: npm
args: ["install"]
- name: node:14.17.1
entrypoint: npm
args: ["run", "build"]
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy"]
timeout: 1200s
It processes Step 0 and Step 1 and fails at Step 2, which is gcloud app deploy. The execution log reports the following error:
ERROR: gcloud crashed (InvalidBuildError): Field [timeout] was provided, but should not have been. You may be using an improper Cloud Build pipeline.
All the documentation I've says that this is how you increase the timeout, some say the the timeout needs to be wrapped in single quotes, but this doesn't appear to be true as if I review the Execution details, it correctly identifies that the timeout is 20 minutes. Trying with single quotes makes no difference to the outcome.
I've also tried setting a timeout at the app deploy step as well, but it produces the same error and would be ineffectual anyway as it is the entire build process that is exceeding the execution time if left at default.