Search code examples
google-cloud-platformgcloudgoogle-cloud-rungoogle-cloud-build

How to increase the cloud build timeout when using ```gcloud run deploy```?


When attempting to deploy to Cloud Run using the gcloud run deploy I am hitting the 10m Cloud Build timeout limit. gcloud run deploy is working well as long as the build step does not exceed 10m. When the build step exceeds 10m, the build fails with the "Timed out" status as shown in below screenshot. AFAIK there are no arguments to gcloud run deploy that can set the Cloud Build timeout limit. gcloud run deploy docs are here: https://cloud.google.com/sdk/gcloud/reference/run/deploy

I've attempted to increase the Cloud Build timeout limit using gcloud config set builds/timeout 20m and gcloud config set container/build_timeout 20m, but these settings are not reflected in the execution details of the cloud build process when using gcloud run deploy.

In the GUI, this is the setting I want to change: enter image description here

Is it possible to increase the Cloud Build timeout limit using gcloud run deploy?


Solution

  • How about splitting the command into (more easily configured) constituents?

    [I've not tried this]

    Build the container image specifying the timeout :

    gcloud builds submit --source=.... --timeout=...
    

    Then reference the image that results when you gcloud run deploy:

    gcloud run deploy ... --image=...