This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
71 lines (68 loc) · 1.65 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
steps:
# Deploy Airflow DAGs
- name: "gcr.io/cloud-builders/gsutil"
id: "Deploy Airflow DAGs"
args:
[
"rsync",
"-r",
"-d",
"-x",
"'.*\\.git.*'",
"airflow/dags",
"gs://${_COMPOSER_BUCKET}/dags",
]
waitFor: ["-"]
# Deploy Airflow plugins
- name: "gcr.io/cloud-builders/gsutil"
id: "Deploy Airflow plugins"
args:
[
"rsync",
"-r",
"-d",
"-x",
"'.*\\.git.*'",
"airflow/plugins",
"gs://${_COMPOSER_BUCKET}/plugins",
]
waitFor: ["-"]
# Deploy pubsub-to-firestore cloud function
- name: "gcr.io/cloud-builders/gcloud"
id: "Deploy pubsub-to-firestore function"
args:
[
"functions",
"deploy",
"pubsub-to-firestore",
"--entry-point",
"PubSubConsumer",
"--runtime",
"go111",
"--trigger-topic",
"${_PUBSUB_TOPIC}",
]
dir: "function"
waitFor: ["-"]
# Deploy front-end
- name: "gcr.io/cloud-builders/npm"
id: "Install frontend dependencies"
args: ["install"]
dir: "frontend"
waitFor: ["-"]
- name: "gcr.io/cloud-builders/npm"
id: "Build frontend"
args: ["run", "build"]
dir: "frontend"
waitFor:
- "Install frontend dependencies"
- name: "gcr.io/$PROJECT_ID/firebase"
id: "Deploy frontend"
args: ["deploy", "--project", "${_FRONTEND_PROJECT}", "--only", "hosting"]
dir: "frontend"
waitFor:
- "Build frontend"
substitutions:
_COMPOSER_BUCKET: asia-northeast1-crown-compo-e8498d8f-bucket
_PUBSUB_TOPIC: composer-demo
_FRONTEND_PROJECT: servian-chris-sandbox