-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudbuild.bac
37 lines (37 loc) · 985 Bytes
/
cloudbuild.bac
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
steps:
- name: "gcr.io/cloud-builders/docker"
id: build
entrypoint: "bash"
args:
[
"-c",
"docker build -t gcr.io/exalted-point-220022/$REPO_NAME:$COMMIT_SHA .",
]
- name: "gcr.io/cloud-builders/docker"
id: push
args: ["push", "gcr.io/exalted-point-220022/$REPO_NAME:$COMMIT_SHA"]
- name: "gcr.io/exalted-point-220022/$REPO_NAME:$COMMIT_SHA"
id: test
entrypoint: "npm"
args: ["install","test"]
- name: gcr.io/cloud-builders/gcloud
id: credentials
args:
- container
- clusters
- get-credentials
- "your-first-cluster-1"
- --zone
- "us-central1-a"
- --project
- "$PROJECT_ID"
- name: "gcr.io/cloud-builders/kubectl"
id: deploy
args:
- "set"
- "image"
- "deployment/myapp"
- "myapp=gcr.io/exalted-point-220022/$REPO_NAME:$COMMIT_SHA"
env:
- "CLOUDSDK_COMPUTE_ZONE=us-central1-a"
- "CLOUDSDK_CONTAINER_CLUSTER=your-first-cluster-1"