0
votes

I have a build which generally takes longer than 10 minutes to complete, which is the default for Google Cloud builds. They keep timing out at 10 minutes despite setting app/cloud_build_timeout to greater than 10 minutes. I have tried both suggestions from this answer. Neither have worked. Here is my cloudbuild.yaml file:

steps:
  - name: node:10.15.1
    entrypoint: yarn
    args: ['install']
  - name: node:10.15.1
    entrypoint: yarn
    args: ['build-config']
  - name: node:10.15.1
    entrypoint: echo
    args: ["$(printenv) | tr ' ' '\n' > .env && cat .env"]
  - name: 'gcr.io/cloud-builders/gcloud'
    entrypoint: 'bash'
    args: ['-c', 'gcloud config set app/cloud_build_timeout 1200 && gcloud app deploy']
timeout: 2400s

Why is my build still timing out?

Hello, checking the documentation and the post that you shared, I could notice that they used the timeout flag both in the step timing out and the whole build, could you add also a timeout property to the step that is timing out and check if this solves the issue? - Luis Manuel
@LuisManuel Hello, thank you for the suggestion. I tried that with no change. The same error is TIMEOUT ERROR: context deadline exceeded - JosephGage
Hi again, I've been playing around with my project trying to reproduce this, I have had not success and my timeout times are working as expected ( I ran a python script with sleep and a custom image of python so that the builds timed out or succeeded) In my tests I even managed to wait for my application more that 40 minutes (which is your limit) and the build succeeded. - Luis Manuel
For solving this situation I suggest to contact the GCP support as when you open a case, they can inspect your project and it would be easier to identify the issue. I think you can use the basic tier of support to get support with them as this would be a support product documentation situation (as the documentation is not working to make the timeout to change). - Luis Manuel