-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudbuild.yaml
49 lines (49 loc) · 1.77 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
steps:
- name: "gcr.io/cloud-builders/git"
args:
- "clone"
- "https://github.com/gclouduniverse/caip-notebooks-marketplace.git"
- name: "gcr.io/cloud-builders/git"
dir: "caip-notebooks-marketplace"
args:
- "checkout"
- "${COMMIT_SHA}"
- name: "gcr.io/caip-notebooks-marketplace-dev/firebase-cli"
dir: "caip-notebooks-marketplace"
entrypoint: "/bin/bash"
secretEnv: ["FIREBASE_TOKEN"]
args:
- "-c"
- "firebase --token=$${FIREBASE_TOKEN} use dev"
- name: "gcr.io/cloud-builders/gcloud"
dir: "caip-notebooks-marketplace"
entrypoint: "bash"
args:
- "-c"
- |
gcloud beta secrets versions access "latest" \
--secret "firebase-config" \
--project "caip-notebooks-marketplace-dev" > ./src/common/constants/keys.ts
- name: "gcr.io/caip-notebooks-marketplace-dev/firebase-cli"
dir: "caip-notebooks-marketplace"
entrypoint: "bash"
args:
- "-c"
- "npm install"
- name: "gcr.io/caip-notebooks-marketplace-dev/firebase-cli"
dir: "caip-notebooks-marketplace"
entrypoint: "bash"
args:
- "-c"
- "npm run build"
- name: "gcr.io/caip-notebooks-marketplace-dev/firebase-cli"
dir: "caip-notebooks-marketplace"
entrypoint: "bash"
secretEnv: ["FIREBASE_TOKEN"]
args:
- "-c"
- "firebase --token=$${FIREBASE_TOKEN} deploy"
secrets:
- kmsKeyName: "projects/caip-notebooks-marketplace-dev/locations/global/keyRings/ci/cryptoKeys/ci-key"
secretEnv:
FIREBASE_TOKEN: "CiQAG7Fhu1RgO+WpOole9wsI1Kmv0kSXtVvSwcHWgfwW11dpHLkSkQEAnxPNe+2eGUhyDk64UUwx6LEG4ITUbiYoQpZvO32eOTBAU3KZJN/ge5LvciGPReiNp/0os1ERhVW6AWQzu4dj/9pRASO0xzTi8yxFYZFvWlCnHkSiqJ7lz3mnqoAegz0Pj7LRiON6UMMM5P/Zqaxd5fRpM9TaWYmz964nIrSPNnfgTAd1xEGX8ssciCYYSywd"