I have tried many different options for extending CloudBuild duration but my gcloud app deploy step will always times out after 10 mins. Following tips from other threads, I have tried this setting on my local terminal
gcloud config set app/cloud_build_timeout 2000
I have also tried many combinations of build job and task level timeouts, but the step always fails at 10 minutes with this error in the cloud build logs
ERROR: context deadline exceeded
And this error on my laptop
Step #2: ERROR: (gcloud.app.deploy) Error Response: [4] Cloud build did not succeed within 10m.
My cloudbuild.yaml is
steps:
- name: gcr.io/cloud-builders/npm
args: [ install ]
- name: 'gcr.io/$PROJECT_ID/ng'
args: ['build', '--prod']
- name: gcr.io/cloud-builders/gcloud
#entrypoint: 'bash'
#args: ['-c', 'gcloud config set app/cloud_build_timeout 2000 && gcloud app deploy']
args: [ app, deploy ]
timeout: 2000s
timeout: 4600s
And I run the build from my laptop with the command
gcloud builds submit . --config=cloudbuild.yaml --timeout=1h
How can I allow the gcloud app deploy step to run for longer than 10 mins?
Update 1
I have also tried various versions of this as per comments below, still the same error message
steps:
- name: gcr.io/cloud-builders/npm
args: [ install ]
timeout: 2000s
- name: 'gcr.io/$PROJECT_ID/ng'
args: ['build', '--prod']
timeout: 2000s
- name: gcr.io/cloud-builders/gcloud
args: [ app, deploy ]
timeout: 2000s
timeout: 6100s
I don't know if it is relevant or not, but looking at the logs, it appears the gcloud app deploy step is compiling the code again, same as the previous step.
From documentation:
Example:
The above example will add a 27-minute timeout to your App Engine deployment.