-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
48 lines (41 loc) · 1.45 KB
/
cloudbuild.yaml
File metadata and controls
48 lines (41 loc) · 1.45 KB
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
steps:
# 1. Copy configuration files from Cloud Storage
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://${_CONFIG_BUCKET}/.firebaserc', '.']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://${_CONFIG_BUCKET}/src/config/app.config.json', 'src/config/']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://${_CONFIG_BUCKET}/src/config/firebase.config.json', 'src/config/']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://${_CONFIG_BUCKET}/src/config/stripe.config.json', 'src/config/']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://${_CONFIG_BUCKET}/functions/src/config/app.config.json', 'functions/src/config/']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://${_CONFIG_BUCKET}/functions/src/config/stripe.config.json', 'functions/src/config/']
# 2. Install dependencies for main project
- name: 'node:22'
entrypoint: npm
args: ['install']
# 3. Build the application
- name: 'node:22'
entrypoint: npm
args: ['run', 'build']
# 4. Install dependencies for functions
- name: 'node:20'
entrypoint: npm
args: ['install']
dir: 'functions'
# 5. Build the functions
- name: 'node:20'
entrypoint: npm
args: ['run', 'build']
dir: 'functions'
# 6. Deploy to Firebase
- name: 'us-docker.pkg.dev/firebase-cli/us/firebase'
args: ['deploy']
# Substitutions to be defined in trigger
substitutions:
_CONFIG_BUCKET: 'your-config-bucket-name'
# Build configuration
options:
logging: CLOUD_LOGGING_ONLY