-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
32 lines (30 loc) · 930 Bytes
/
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
24
25
26
27
28
29
30
31
32
steps:
# This step builds the container image.
- name: 'gcr.io/cloud-builders/docker'
id: Build
args:
- 'build'
- '-t'
- 'gcr.io/$PROJECT_ID/cafe-and-kids:$SHORT_SHA'
- '.'
# This step pushes the image to Container Registry
# The PROJECT_ID and SHORT_SHA variables are automatically
# replaced by Cloud Build.
- name: 'gcr.io/cloud-builders/docker'
id: Push
args:
- 'push'
- 'gcr.io/$PROJECT_ID/cafe-and-kids:$SHORT_SHA'
# This step updates the image being used in GKE deployment
- name: 'gcr.io/cloud-builders/kubectl'
id: Update GKE deployment
args:
- 'set'
- 'image'
- 'deployment'
- 'cafe-and-kids-deployment'
- 'cafe-and-kids-container=gcr.io/everyones-happy/cafe-and-kids:$SHORT_SHA'
- '--record'
env:
- 'CLOUDSDK_COMPUTE_ZONE=us-central1-a'
- 'CLOUDSDK_CONTAINER_CLUSTER=your-first-cluster-1'