-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
27 lines (27 loc) · 1.42 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
steps:
- name: "gcr.io/cloud-builders/gcloud"
args: ["artifacts", "docker", "images", "delete", "us-east1-docker.pkg.dev/postcard-368413/cloud-run-source-deploy/postcard/", "--delete-tags"]
allowFailure: true
- name: "gcr.io/cloud-builders/gcloud"
args: ["artifacts", "docker", "images", "delete", "us-east1-docker.pkg.dev/postcard-368413/gcf-artifacts/postcard--function/", "--delete-tags"]
allowFailure: true
- name: "gcr.io/cloud-builders/gcloud"
args: ["artifacts", "docker", "images", "delete", "us-east1-docker.pkg.dev/postcard-368413/gcf-artifacts/postcard--function/cache/", "--delete-tags"]
allowFailure: true
- name: 'gcr.io/cloud-builders/npm'
args: ['install']
- name: 'gcr.io/cloud-builders/npm'
args: ["run", "build"]
secretEnv: ['MAPS_API_KEY']
- name: "gcr.io/cloud-builders/gcloud"
args: ["storage", "rm", "--recursive", "gs://postcard.gaborcsapo.com/*"]
allowFailure: true
- name: "gcr.io/cloud-builders/gcloud"
args: ["storage", "cp", "--recursive", "--cache-control=public,max-age=60", "dist/*", "gs://postcard.gaborcsapo.com"]
- name: "gcr.io/cloud-builders/gcloud"
args: ["functions", "deploy", "postcard-function", "--region=us-east1", "--source", ".", "--trigger-http", "--runtime=nodejs16", "--allow-unauthenticated", "--entry-point=app", "--gen2"]
timeout: "1600s"
availableSecrets:
secretManager:
- versionName: projects/952598646239/secrets/MAPS_API_KEY/versions/latest
env: 'MAPS_API_KEY'