Skip to content

Commit a5788ff

Browse files
committed
Add Cloud Build configuration for Docker image build and deployment
- Introduced a new cloudbuild.yaml file to automate the Docker image build and deployment process. - Configured steps to build the Docker image from the specified Dockerfile and push it to Google Container Registry. - Added deployment step to Google Cloud Run for the stack-backend-staging service using the built image. These changes facilitate continuous integration and deployment for the backend service.
1 parent a10b0f1 commit a5788ff

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

cloudbuild.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
steps:
2+
- name: gcr.io/cloud-builders/docker
3+
args:
4+
- build
5+
- -t
6+
- gcr.io/stack-auth-gcp-actual/github.com/stack-auth/stack-auth:$COMMIT_SHA
7+
- -f
8+
- docker/backend/Dockerfile
9+
- .
10+
- name: gcr.io/cloud-builders/docker
11+
args:
12+
- push
13+
- gcr.io/stack-auth-gcp-actual/github.com/stack-auth/stack-auth:$COMMIT_SHA
14+
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
15+
args:
16+
- gcloud
17+
- run
18+
- deploy
19+
- stack-backend-staging
20+
- --image=gcr.io/stack-auth-gcp-actual/github.com/stack-auth/stack-auth:$COMMIT_SHA
21+
- --region=us-east4
22+
options:
23+
logging: CLOUD_LOGGING_ONLY
24+
machineType: E2_HIGHCPU_32

0 commit comments

Comments
 (0)