Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

Some time ago I remember receiving an email from Google announcing that projects deployed to App Engine (even via the gcloud tool) will use the Cloud Build service during deployment time. I didn't really take too much notice of that as it wasn't stressed in the email so didn't bother setting anything up, then my deployments started to fail with this error...
 Error
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx status: FAILURE.
Build error details: Failed to download at least one file. Cannot continue.

cloudbuild_6.png


Checking the build log (linked to in the error message from gcloud) gave me a bit more information...
 Build Log
starting build "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest gs://staging.xxxxxxxx.appspot.com/ae/ac7d652c-04e0-426e-a767-7d6ddb3ffaf5/manifest.json.
Step #0 - "fetcher": Processing 1558 files.
Step #0 - "fetcher": Failed to fetch gs://staging.xxxxxxxx.appspot.com/7ff56cf0fa9a3bbee7598cbe74d6f167e9ca6794, will no longer retry: Access to bucket staging.xxxxxxxx.appspot.com denied. You must grant Storage Object Viewer permission to [email protected]
...
Finished Step #0 - "fetcher"
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/gcs-fetcher" failed: step exited with non-zero status: 1


From the log it was quite obvious what I didn't do, yes I should have set up all the account permissions when I received that email from Google! Anyway this page details the process - Setting service account permissions and also this one - Deploying to App Engine



As expected my Cloud Build settings had everything disabled (which is the default)...
cloudbuild_1.png


I Enabled the Cloud Functions service, which prompted me to enable Service Accounts too. I also enabled App Engine.
cloudbuild_2.png

cloudbuild_3.png

cloudbuild_4.png


Once all of that was done, I tried deploying my app again...and it worked!
cloudbuild_5.png


-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.