Files
rowy/cloudbuildfunctions.yaml
2020-06-29 12:48:21 +08:00

36 lines
946 B
YAML

steps:
- name: gcr.io/cloud-builders/gcloud
args:
- kms
- decrypt
- --ciphertext-file=cloud_functions/functions/firebase-credentials.json.enc
- --plaintext-file=cloud_functions/functions/firebase-credentials.json
- --location=global
- --keyring=antler-vc
- --key=cloudbuild-env
- name: node:10.15.1
entrypoint: yarn
args: ["install"]
dir: "cloud_functions/functions"
- name: node:10.15.1
entrypoint: yarn
args:
- "generateConfig"
- "'${_FUNCTION_CONFIG}'"
dir: "cloud_functions/functions"
- name: node:10.15.1
entrypoint: yarn
args:
- "deployFT"
- "--project"
- "${_PROJECT_ID}"
- "--token"
- "${_FIREBASE_TOKEN}"
- "--only"
- "functions:${_FUNCTIONS_GROUP}"
dir: "cloud_functions/functions"
substitutions:
_PROJECT_ID: "project-id" # default value
_FUNCTIONS_GROUP: "exportTable" # default value