-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
36 lines (29 loc) · 1.18 KB
/
cloudbuild.yaml
File metadata and controls
36 lines (29 loc) · 1.18 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
steps:
# Step 1: Build the app image
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "gcr.io/$PROJECT_ID/text-learn-app", "."]
# Step 2: Pull the db image (PostgreSQL)
- name: "gcr.io/cloud-builders/docker"
args: ["pull", "postgres"]
# Step 3: Pull the pgweb image
- name: "gcr.io/cloud-builders/docker"
args: ["pull", "sosedoff/pgweb"]
# Step 4: Push the app image to Google Container Registry
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/$PROJECT_ID/text-learn-app"]
# Step 5: Tag and push the db image to Google Container Registry
- name: "gcr.io/cloud-builders/docker"
args: ["tag", "postgres", "gcr.io/$PROJECT_ID/postgres"]
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/$PROJECT_ID/postgres"]
# Step 6: Tag and push the pgweb image to Google Container Registry
- name: "gcr.io/cloud-builders/docker"
args: ["tag", "sosedoff/pgweb", "gcr.io/$PROJECT_ID/pgweb"]
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/$PROJECT_ID/pgweb"]
images:
- "gcr.io/$PROJECT_ID/text-learn-app"
- "gcr.io/$PROJECT_ID/postgres"
- "gcr.io/$PROJECT_ID/pgweb"
options:
logging: CLOUD_LOGGING_ONLY