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

Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...