Skip to content

Instantly share code, notes, and snippets.

@JaniKibichi
Created April 7, 2021 11:48
Show Gist options
  • Save JaniKibichi/87ae019f38c376ea049d184619590de5 to your computer and use it in GitHub Desktop.
Save JaniKibichi/87ae019f38c376ea049d184619590de5 to your computer and use it in GitHub Desktop.
Sample cloudbuild
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/bboxxussd:$COMMIT_SHA', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/bboxxussd:$COMMIT_SHA']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'bboxxussd'
- '--image'
- 'gcr.io/$PROJECT_ID/bboxxussd:$COMMIT_SHA'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
images:
- 'gcr.io/$PROJECT_ID/bboxxussd:$COMMIT_SHA'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment