forked from cds-snc/dependency-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
45 lines (45 loc) · 1.29 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
steps:
- name: "gcr.io/cloud-builders/yarn"
id: "install"
args: ["install"]
- name: "gcr.io/cloud-builders/gcloud"
id: "decrypt firestore"
args:
- kms
- decrypt
- --ciphertext-file=firestore.json.enc
- --plaintext-file=firestore.json
- --location=global
- --keyring=deploy
- --key=firestore
- name: "gcr.io/cloud-builders/gcloud"
id: "decrypt .env"
args:
- kms
- decrypt
- --ciphertext-file=.env.enc
- --plaintext-file=.env
- --location=global
- --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
- --keyring=deploy
- --key=github
- name: "gcr.io/cloud-builders/yarn"
waitFor: ["decrypt firestore", "decrypt .env", "decrypt github"]
id: "test"
args: ["test"]
- name: "gcr.io/cloud-builders/gcloud"
waitFor: ["decrypt firestore", "decrypt .env", "decrypt github"]
entrypoint: "bash"
args:
- "-c"
- |
if [[ "$BRANCH_NAME" == "master" ]]; then gcloud functions deploy scanPackages --runtime nodejs8 --memory=1024M --timeout=90s --trigger-http; else exit 0; fi