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.
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.
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.
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? 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.
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
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 ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With