-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
executable file
·43 lines (38 loc) · 1.22 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
executable file
·43 lines (38 loc) · 1.22 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
# Tell Cloud Build to always use the Cloud Build SA
# serviceAccount: "my-build-sa@informationextraction-468103.iam.gserviceaccount.com"
steps:
# Step 1: Build the Docker image
- name: gcr.io/cloud-builders/docker
args:
- build
- --no-cache
- -t
- us-west1-docker.pkg.dev/informationextraction-468103/${_REPO}/${_IMAGE}:$BUILD_ID
- -t
- us-west1-docker.pkg.dev/${PROJECT_ID}/${_REPO}/${_IMAGE}:latest
- .
# Step 2: Push the image
- name: gcr.io/cloud-builders/docker
args:
- push
- us-west1-docker.pkg.dev/informationextraction-468103/${_REPO}/${_IMAGE}:$BUILD_ID
# Step 3: Deploy to Cloud Run
- name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
entrypoint: gcloud
args:
- run
- deploy
- ${_SERVICE}
- --image=us-west1-docker.pkg.dev/informationextraction-468103/${_REPO}/${_IMAGE}:$BUILD_ID
- --region=${_REGION}
- --platform=managed
- --allow-unauthenticated
- --service-account=run-exec@informationextraction-468103.iam.gserviceaccount.com
substitutions:
_SERVICE: "my-app"
_REPO: "ocr-rag-app-repo"
_IMAGE: "rag-api"
_REGION: "us-west1"
options:
machineType: "E2_HIGHCPU_8"
logging: CLOUD_LOGGING_ONLY