munchybunch
munchybunch

Reputation: 6163

Google Cloud Build timing out

I have a Google Cloud Build build that times out after 10 min, 3 sec. Is there a way to extend that timeout?

The build status is set to "Build failed (timeout)" and I'm okay with it taking longer than 10 minutes.

Upvotes: 49

Views: 27911

Answers (2)

Paul Lewallen
Paul Lewallen

Reputation: 721

In cloudbuild.yaml you have to add something like timeout: 660s.

E.g.

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t', 'gcr.io/[PRODUCT_ID]/[CONTAINER_IMAGE]', '.' ]
images: 
- 'gcr.io/[PRODUCT_ID]/[CONTAINER_IMAGE]'
timeout: 660s

Upvotes: 59

David Bendory
David Bendory

Reputation: 1268

If you defined your build using a cloudbuild.yaml, you can just set the timeout field; see the full definition of a Build Resource in the documentation.

If you are using the gcloud CLI, it takes a --timeout flag; try gcloud builds submit --help for details.

Example: gcloud builds submit --timeout=900s ...

Upvotes: 34

Related Questions