0
votes

Hello I have exhausted all sorts of options i found on web and nothings seems to work for me.

I am pushing changes to a repo which is already setup for cloud build.

This is my yaml file for cloud trigger

steps:

  • name: "gcr.io/cloud-builders/gcloud"

    args: ["app", "deploy", ".yaml"]

    timeout: 1200s

timeout: 1500s enter image description here

It also triggers one extra Google Cloud Storage build in parallel which I cant figure out where is it coming from. It has no ties to the code repo I got. This build times out in 10 minutes and hence causing my main build to fail.
Even if set timeout to 1200 to my step, it seems to have no impact on this cloud storage build. It times out at 10 mins.

TIA

enter image description here

I already have timeouts on steps and build level which is higher than 10minuyes, but this doesnot seem to do the magic on "Google Cloud Storage" build

2
Have you tried running gcloud config set app/cloud_build_timeout 1200 and then trying to run your build with gcloud builds submit? - Daniel Ocando
@DanielOcando, I think that is not linked to the current Cloud Build, but to the AppEngine deploy command that also call a Cloud Build. - guillaume blaquiere
Guys, See my answer below. that one fixed it. - manisha-sh

2 Answers

1
votes

I can tell you why you have this error, but not how to fix it...

Why?? Because the gcloud app deploy command use Cloud Build

During deployment, the Cloud Build service builds a container image of your application to run in the App Engine standard environment. Learn more in Managing build images.

The Cloud Build default timeout parameter is 10 minutes. That's why.

How to fix?

If you use flexible environment, try to build your container separately. Then create a Dockerfile which only use your builded container (FROM gcr.io/MyProjectID/containerName) and use a runtime: custom in your app.yaml file.

If you use standard environment, what's your service? Is it big? Do it have lot of dependencies?

0
votes

This solved it: steps:

  • name: 'gcr.io/cloud-builders/gcloud' entrypoint: 'bash' args: ['-c', 'gcloud config set app/cloud_build_timeout 1800 && gcloud app deploy my-service/my-config.yaml']

seems like step level timeout didnot work for me. but this one is cool . phewwww. thanks all Guys!