Intro Brief:
This demonstration is an end-to-end project using Google Cloud Build, focusing on deploying a Node.js application to Google Cloud Run. This project requires setting up a GitHub repository, configuring Cloud Build triggers, and deploying the application to Cloud Run. I will walk through each step of the process, from setting up the GitHub repository to triggering Automatic Builds upon code push.
Set up GitHub repository (gcd-demo)
Create .gitignore file for Node.js
Clone repository to local computer using GitHub Desktop
Add Node.js app files (index.js, package.json)
[Deployment to Cloud Run]
Add Dockerfile for app
Deploy app to Cloud Run (gcloud run deploy)
Enable Cloud Run admin role in Cloud Build settings
Modify index.js to mention Cloud Build
Submit Cloud Build using 'gcloud builds submit'
[Automated Builds with Cloud Build Triggers]
Create Cloud Build configuration file (cloudbuild.yaml)
Set up Cloud Build trigger on GitHub push
Modify index.js to mention Cloud Trigger
Push changes to GitHub repository
Automatic build starts in Cloud Build
Update reflected in public URL after successful build
Project Files: https://github.com/ArchitectUC/gcd-demo
Explanation of the Process​ in Detail:
created with
Best Free Website Builder .