Cloud Build
ELI5 — The Vibe Check
Cloud Build is GCP's CI/CD service that runs your build, test, and deploy pipeline in the cloud. Push code to GitHub, Cloud Build picks it up, runs your steps (build Docker image, run tests, push to registry, deploy to Cloud Run), and your app is live. Like GitHub Actions but living entirely inside GCP.
Real Talk
Google Cloud Build is a fully managed CI/CD service that executes builds on GCP infrastructure. Builds are defined as sequences of steps in YAML (cloudbuild.yaml) using builder images. It integrates with Cloud Source Repositories, GitHub, Bitbucket, Artifact Registry, and all GCP deployment targets. Charged per build-minute.
Show Me The Code
# cloudbuild.yaml — build, test, and deploy to Cloud Run
steps:
- name: 'node:18'
entrypoint: 'npm'
args: ['ci']
- name: 'node:18'
entrypoint: 'npm'
args: ['test']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/my-app:$COMMIT_SHA', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/my-app:$COMMIT_SHA']
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
args:
- 'gcloud'
- 'run'
- 'deploy'
- 'my-app'
- '--image=gcr.io/$PROJECT_ID/my-app:$COMMIT_SHA'
- '--region=us-central1'
When You'll Hear This
"Cloud Build runs the tests and deploys to Cloud Run on every push to main." / "The Cloud Build trigger is connected to the GitHub repo."
Related Terms
Cloud Run
Cloud Run is GCP's magic platform for running containerized apps without managing servers.
DevOps
DevOps is the culture and practice of tearing down the wall between the people who write code (Dev) and the people who run it in production (Ops).
Docker
Docker is like a lunchbox for your app.
GCP (Google Cloud Platform)
GCP is Google's version of the giant rental computer warehouse.
GitHub Actions
GitHub Actions is CI/CD built right into GitHub. Push code, run tests, deploy — all from YAML files in your repo. No separate CI server needed.
Managed Service
A managed service is when the cloud provider runs the thing for you — you don't patch it, back it up, or fix it when it crashes.