-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
23 lines (19 loc) · 1.17 KB
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# steps:
# - name: 'gcr.io/k8s-skaffold/pack'
# entrypoint: 'pack'
# args: ['build', '--builder=gcr.io/buildpacks/builder:v1', '--path', 'samples/go', '--publish', 'gcr.io/$PROJECT_ID/cloudbowl-samples-go:$COMMIT_SHA']
# - name: 'gcr.io/cloud-builders/gcloud'
# args: ['run', 'deploy', '--image=gcr.io/$PROJECT_ID/cloudbowl-samples-go:$COMMIT_SHA', '--platform=managed', '--project=$PROJECT_ID', '--region=us-central1', '--allow-unauthenticated', '--memory=256Mi', 'cloudbowl-samples-go']
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/cloudbowl-go-api:$COMMIT_SHA', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/cloudbowl-go-api:$COMMIT_SHA']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args: ['run', 'deploy', '--image=gcr.io/$PROJECT_ID/cloudbowl-go-api:$COMMIT_SHA', '--platform=managed', '--project=$PROJECT_ID', '--region=asia-east2', '--allow-unauthenticated', '--memory=256Mi', 'cloudbowl-go-api']
images:
- gcr.io/$PROJECT_ID/cloudbowl-go-api:$COMMIT_SHA