This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloudbuild.yaml
67 lines (66 loc) · 2.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
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
steps:
- name: node:16.17.0
entrypoint: npm
args: ["install"]
- name: node:16.17.0
entrypoint: npm
args: ["run", "create-env"]
env:
- "NEXT_PUBLIC_FIREBASE_API_KEY=${_NEXT_PUBLIC_FIREBASE_API_KEY}"
- "NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=${_NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN}"
- "NEXT_PUBLIC_FIREBASE_PROJECT_ID=${_NEXT_PUBLIC_FIREBASE_PROJECT_ID}"
- "NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=${_NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET}"
- "NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=${_NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}"
- "NEXT_PUBLIC_FIREBASE_APP_ID=${_NEXT_PUBLIC_FIREBASE_APP_ID}"
- "NEXT_PUBLIC_GOOGLE_CALENDAR_EMAIL=${_NEXT_PUBLIC_GOOGLE_CALENDAR_EMAIL}"
- "NEXT_PUBLIC_GOOGLE_CALENDAR_API_KEY=${_NEXT_PUBLIC_GOOGLE_CALENDAR_API_KEY}"
- "NEXT_PUBLIC_GOOGLE_CLIENT_ID=${_NEXT_PUBLIC_GOOGLE_CLIENT_ID}"
- "NEXT_PUBLIC_GOOGLE_CLIENT_SECRET=${_NEXT_PUBLIC_GOOGLE_CLIENT_SECRET}"
- "NEXTAUTH_SECRET=${_NEXTAUTH_SECRET}"
- "NEXTAUTH_URL=${_NEXTAUTH_URL}"
- "FIREBASE_CLIENT_EMAIL=${_FIREBASE_CLIENT_EMAIL}"
- "FIREBASE_PRIVATE_KEY=${_FIREBASE_PRIVATE_KEY}"
- name: gcr.io/cloud-builders/docker
args:
- build
- "--no-cache"
- "-t"
- "$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA"
- .
- "-f"
- Dockerfile
id: Build
- name: gcr.io/cloud-builders/docker
args:
- push
- "$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA"
id: Push
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
args:
- run
- services
- update
- $_SERVICE_NAME
- "--platform=managed"
- "--image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA"
- >-
--labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID,$_LABELS
- "--region=$_DEPLOY_REGION"
- "--quiet"
id: Deploy
entrypoint: gcloud
images:
- "$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA"
options:
substitutionOption: ALLOW_LOOSE
substitutions:
_LABELS: gcb-trigger-id=925962c9-03bc-4889-aef9-83ddce55365d
_TRIGGER_ID: 925962c9-03bc-4889-aef9-83ddce55365d
_GCR_HOSTNAME: us.gcr.io
_PLATFORM: managed
_SERVICE_NAME: dev
_DEPLOY_REGION: us-west1
tags:
- gcp-cloud-build-deploy-cloud-run
- gcp-cloud-build-deploy-cloud-run-managed
- dev