forked from cds-snc/bundle-size-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
56 lines (56 loc) · 1.44 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
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
56
steps:
- name: "gcr.io/cloud-builders/yarn"
id: "install"
args: ["install"]
- name: "gcr.io/cloud-builders/yarn"
id: "test"
args: ["test"]
env:
[
"BUILD_CMD=build",
"CHARTING_URL=''",
"FIRESTORE_URL=''",
"GITHUB_TOKEN=abcd",
"SRC_PATH=''",
"TMP_PATH=/tmp",
]
- name: "gcr.io/cloud-builders/gcloud"
id: "decrypt keyfile"
args:
- kms
- decrypt
- --ciphertext-file=keyfile.json.enc
- --plaintext-file=keyfile.json
- --location=global
- --project=bundle-size-tools
- --keyring=deploy
- --key=keyfile
- name: "gcr.io/cloud-builders/gcloud"
id: "decrypt .env"
args:
- kms
- decrypt
- --ciphertext-file=.env.enc
- --plaintext-file=.env
- --location=global
- --project=bundle-size-tools
- --keyring=deploy
- --key=env
- name: "gcr.io/cloud-builders/gcloud"
id: "decrypt github"
args:
- kms
- decrypt
- --ciphertext-file=github.pem.enc
- --plaintext-file=github.pem
- --location=global
- --project=bundle-size-tools
- --keyring=deploy
- --key=github
- name: "gcr.io/cloud-builders/yarn"
waitFor: ["decrypt keyfile", "decrypt .env", "decrypt github"]
entrypoint: "bash"
args:
- "-c"
- |
if [[ "$BRANCH_NAME" == "master" ]]; then yarn global add serverless && serverless deploy; else exit 0; fi