-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
33 lines (30 loc) · 1.04 KB
/
cloudbuild.yaml
File metadata and controls
33 lines (30 loc) · 1.04 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
steps:
# Step 1: Aapke Dockerfile se container image banayega
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '-t'
- 'europe-west1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/cod-form-app:$COMMIT_SHA'
- '.'
# Step 2: Nayi image ko Artifact Registry mein push karega
- name: 'gcr.io/cloud-builders/docker'
args:
- 'push'
- 'europe-west1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/cod-form-app:$COMMIT_SHA'
# Step 3: Nayi image ko Cloud Run par deploy karega
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'cod-form-app' # Aapki Cloud Run service ka naam
- '--image'
- 'europe-west1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/cod-form-app:$COMMIT_SHA'
- '--region'
- 'europe-west1' # Aapki Cloud Run service ka region
- '--platform'
- 'managed'
- '--allow-unauthenticated'
# Build ki gayi images ki list
images:
- 'europe-west1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/cod-form-app:$COMMIT_SHA'