Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 613
munchybunch Avatar asked Mar 10 '17 20:03

munchybunch


People also ask

Is Google cloud build free?

First 120 builds-minutes per day are free. A Quick Start build starts without a provisioning delay. Promotional free tier of 120 free build-minutes per day is per billing account and is subject to change. If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Which is the best file format to define cloud build structure?

You can write the build config file using the YAML or the JSON syntax. If you submit build requests using third-party http tools such as curl, use the JSON syntax. Note: If you're using VS Code or IntelliJ IDEs, you can use Cloud Code to author your YAML config files.

What is Google Cloud build?

Cloud Build is a service that executes your builds on Google Cloud. Cloud Build can import source code from a variety of repositories or cloud storage spaces, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives.

How do you configure cloud build to rebuild your image when a change is made to the source code?

How do you configure Cloud Build to rebuild your image when a change is made to the source code? Add a Cloud Build trigger, and set it to fire on commit to associate repository. Add a Cloud Build function, and set it to fire on commit to associate repository.


2 Answers

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 
like image 169
Paul Lewallen Avatar answered Sep 22 '22 23:09

Paul Lewallen


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 ...

like image 42
David Bendory Avatar answered Sep 22 '22 23:09

David Bendory