-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
56 lines (51 loc) · 1.14 KB
/
cloudbuild.yaml
File metadata and controls
56 lines (51 loc) · 1.14 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
steps:
- name: docker
args:
- buildx
- create
- '--driver'
- docker-container
- '--name'
- container
- '--use'
- name: docker
args:
- buildx
- build
- '--platform'
- 'linux/amd64,linux/arm64'
- '-t'
- '${_GCR_IMAGE}:${_TAG}'
- '-t'
- "${_GCR_IMAGE}:$SHORT_SHA"
- '--push'
- .
# Deploy to Kubernetes
# - name: "gcr.io/cloud-builders/kubectl"
# args: [
# 'set',
# 'image',
# 'deployment',
# '${_APP_NAME}',
# "${_APP_NAME}=${_GCR_IMAGE}:${_KUBE_DEPLOY_TAG}",
# '-n',
# "${_KUBE_NS}"
# ]
# env:
# - 'CLOUDSDK_COMPUTE_ZONE=${_KUBE_LOCATION}'
# - 'CLOUDSDK_CONTAINER_CLUSTER=${_KUBE_CLUSTER}'
options:
dynamic_substitutions: true
substitutions:
_APP_NAME: cns-cli
_ARTIFACT_REGISTRY_REPO: cnscp
_ENV: staging
_GCR_IMAGE: >-
us-central1-docker.pkg.dev/${_GCR_PROJ}/${_ARTIFACT_REGISTRY_REPO}/${_APP_NAME}
_GCR_PROJ: padi-staging
_TAG: latest
_KUBE_CLUSTER: padi-staging
_KUBE_DEPLOY_TAG: '${SHORT_SHA}'
_KUBE_LOCATION: us-central1-c
_KUBE_NS: cns-dev