How do I get rid of the GCP Cloud Build Timeout Error

Viewed 2165

Hi I am submitting a config for cloud build but it keeps timing out.

 gcloud builds submit --config cloudbuild.yaml . --timeout=500s

The timeout message is as follows

Your build timed out. Use the [--timeout=DURATION] flag to change the timeout threshold.
ERROR: (gcloud.builds.submit) build 283b72fa-cef1-425d-b21e-7bf653d22e4b completed with status "TIMEOUT"
1 Answers

You could try a couple of things:

  • Increasing the timeout duration of the flag if you haven't already.
  • Instead of using the --timeout flag, add the timeout field inside the cloudbuild.yaml. You can either do that for each step or for the whole build. Here you can find more information about how to create a configuration file.
Related