Google Cloud Build how to properly solve issues

Sascha Heyer
May 14 · 2 min read

A few weeks ago I started to use Cloud Build to set up an automatic deployment. I already deployed the application from my local machine with gcloud app deploy and I thought it is time to set up a proper deployment and release pipeline.

As I started my very first deployment with Cloud Build I got the following error:

The error message is pretty clear there is a non-supported character. I found several similar error cases and the Google support describes where such characters are not allowed:

  • app.yaml
  • and in all file paths which are part of the app

Since I hadn’t any non-supported character in the app.yaml or in my file paths it was obvious that this was caused by some node-module. A few minutes later I found the node.js dependency which caused the issue.

There are several tweaks which are truly useful while debugging Cloud Build.

Use debugging

To get additional information during the build process you can set the verbosity to debug:

Use cloud-build-local

It is possible to run the exact same build process which runs in Cloud Build on your local machine. Please keep in mind Docker is required.

Check the documentation for detailed information.

Conclusion

This shows how easy deployments can fail caused by failures in external dependencies, but Google provides us several options to solve such issues very quickly.


Thanks for reading.

If you enjoyed my article feel free to leave some claps 👏.
Your feedback and questions are highly appreciated, you can find me on Twitter
@HeyerSascha.

Google Cloud Platform - Community

A collection of technical articles published or curated by Google Cloud Platform Developer Advocates. The views expressed are those of the authors and don't necessarily reflect those of Google.

Sascha Heyer

Written by

Hi, I am Sascha, Software and Machine Learning Engineer 🚀 at TWT in Berlin and the Creator of https://defects.ai. Opinions are my own, not that of my company.

Google Cloud Platform - Community

A collection of technical articles published or curated by Google Cloud Platform Developer Advocates. The views expressed are those of the authors and don't necessarily reflect those of Google.